webpro 31 Posted December 3, 2015 Report Share Posted December 3, 2015 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 as1,2,3,4,5 etc.. But i want this:1/50002/5000etc... Minding i have a 5k item list of courseSo one out of 5k done, two out of 5k done and so on.So i know how much there is left to do ? Thanks Quote Link to post Share on other sites
pftg4 102 Posted December 4, 2015 Report Share Posted December 4, 2015 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)) } Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 4, 2015 Report Share Posted December 4, 2015 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)) } 2 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.