Jump to content
UBot Underground

How Can We Show In Ui Stat, The Total Number Of Items In A List?


Recommended Posts

How can we show in UI STAT, the total number of items in a list?

ui open file("Get urls",#geturls)
ui stat monitor("Where are we:",#wherearewe)
set(#wherearewe,1,"Global")
clear list(%get urls)
add list to list(%get urls,$list from file(#geturls),"Delete","Global")
loop($list total(%get urls)) {
    navigate($next list item(%get urls),"Wait")
    WaitForAll()
    increment(#wherearewe)
    wait($rand(3,10))
}

This works fine as it will show as

1,2,3,4,5 etc..

 

But i want this:

1/5000

2/5000

etc...

 

Minding i have a 5k item list of course

So one out of 5k done, two out of 5k done and so on.

So i know how much there is left to do ?

 

Thanks

Link to post
Share on other sites

ui open file("Get urls",#geturls)
ui stat monitor("Where are we:","{#wherearewe}/5000")
set(#wherearewe,1,"Global")
clear list(%get urls)
add list to list(%get urls,$list from file(#geturls),"Delete","Global")
loop($list total(%get urls)) {
navigate($next list item(%get urls),"Wait")
WaitForAll()
increment(#wherearewe)
wait($rand(3,10))
}

Link to post
Share on other sites

It's very important that when you make the ui stat monitor and you add in the variables in this fashion: #variable/#variable that you click on the quotes button " or it will constantly throw an error that it can't divide two strings.

 

Try this code though it should be what you want:

ui open file("Get urls",#geturls)
ui stat monitor("Where are we:","{#wherearewe}/{#total}")
clear list(%get urls)
add list to list(%get urls,$list from file(#geturls),"Delete","Global")
set(#wherearewe,0,"Global")
set(#total,$list total(%get urls),"Global")
loop($list total(%get urls)) {
    navigate($next list item(%get urls),"Wait")
    WaitForAll()
    increment(#wherearewe)
    wait($rand(3,10))
}

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...