Jump to content



Photo

List Being Turned To Scientific Notation

list sort list

  • Please log in to reply
3 replies to this topic

#1 ed08724

ed08724

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts
  • OS:Windows 7
  • Total Memory:< 1Gb
  • Framework:v4.0
  • License:Professional Edition

Posted 08 November 2018 - 11:30 AM

in Ubot Studio X I want to sort a list but the resulting list is ending up in scientific notation

 

add list to list(%sorted,$sort list(%myposts,"Descending"),"Delete","Global")

 

%myposts

10156238019934531
10156239823899531
10156240530969531
10156238848409531
10156236482544531
10156760025704031
10156235105739531
10156233189979531
10156232720419531
10156232175324531
10156230650744531
 
%sorted
1.0156760025704E+16
1.01562405309695E+16
1.01562398238995E+16
1.01562388484095E+16
1.01562380199345E+16
1.01562364825445E+16
1.01562351057395E+16
1.01562331899795E+16
1.01562327204195E+16
1.01562321753245E+16
1.01562306507445E+16

 

How can't I prevent that?

 



#2 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 2923 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 08 November 2018 - 02:02 PM

I would look into using Python maybe to do it inside of Ubot it would probably be the only way without using some kind of plugin.



#3 ed08724

ed08724

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts
  • OS:Windows 7
  • Total Memory:< 1Gb
  • Framework:v4.0
  • License:Professional Edition

Posted 08 November 2018 - 03:52 PM

I added a z in the front of each list item
sorted the list
then removed the z in the front of each list element.



#4 UBotBuddy

UBotBuddy

    UBot Studio Training

  • ADMIN
  • 3520 posts
  • LocationVirginia
  • OS:Windows 10
  • Total Memory:8Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 08 November 2018 - 06:06 PM

@ed08724 and I had the same idea

 

Here's my code:

clear list(%myposts)
clear list(%sorted)
add list to list(%myposts,$list from text("10156230650744531Q
10156232175324531Q
10156232720419531Q
10156233189979531Q
10156235105739531Q
10156236482544531Q
10156238019934531Q
10156238848409531Q
10156239823899531Q
10156240530969531Q
10156760025704031Q","
"),"Delete","Global")
set(#var,$replace($sort list(%myposts,"Descending"),"Q",$nothing),"Global")
add list to list(%sorted,$list from text(#var,"
"),"Delete","Global")


UBot Training for FREE! Yes, that is correct!





Also tagged with one or more of these keywords: list, sort list

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users