Ira_Hayes 4 Posted December 2, 2011 Report Share Posted December 2, 2011 I want to nav to a url web.com?s=000000001I need to increment the number, while not changing the total number of digits, like this 000000100000020000003...00000100000011...000009900001000000101... Quote Link to post Share on other sites
Ira_Hayes 4 Posted December 2, 2011 Author Report Share Posted December 2, 2011 Turns out the website works without the leading zeros too. I'd still like to know how to do this if possible, if not, no big deal. Quote Link to post Share on other sites
JohnB 255 Posted December 3, 2011 Report Share Posted December 3, 2011 Like this: set(#page, 1, "Global")loop(10) { navigate("http://web.com?s=00000000{#page}", "Wait") increment(#page) wait(5)} John Quote Link to post Share on other sites
Ira_Hayes 4 Posted December 3, 2011 Author Report Share Posted December 3, 2011 That's not quite what I was asking because in your scenario, when you hit the 10th loop, the total number of digits will increase by one, so you would have this:0000000090000000010whereas all my samples had the same number of digits. 000000009000000010I found out though it didn't matter for my job because I could remove any preceding zeros. Quote Link to post Share on other sites
JohnB 255 Posted December 3, 2011 Report Share Posted December 3, 2011 No, it would still work fine...you would just add a condition that if #page is greater than 9, then url = (one less zero), if #page is greater than 99, then url = (remove another 0). I was just provide a process by which you would accomplish that. John Quote Link to post Share on other sites
odeesuba 24 Posted December 3, 2011 Report Share Posted December 3, 2011 try this set(#pagenumber, 0, "Global") ui stat monitor("Numbers", #pagenumber) loop(1000000) { increment(#pagenumber) set(#pagenumber, $pad text(#pagenumber, 0, 8, "Left"), "Global") wait(0.01) } 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.