Brutal 164 Posted April 25, 2015 Report Share Posted April 25, 2015 I have a bot that submits data at random intervals between 30 seconds and 300 seconds. I am wanting to use a stat monitor to display the time until the next submit to the user. Any ideas on how to achieve that?... Example, random wait gets automatically set to: 128 seconds, so the stat monitor will show a countdown from 128 to zero Quote Link to post Share on other sites
darryl561 177 Posted April 25, 2015 Report Share Posted April 25, 2015 You can try something like this: ui button("start") { set wait() } ui stat monitor("Next Run:", #waiting) define set wait { set(#waiting, $rand(30, 300), "Global") loop(#waiting) { decrement(#waiting) wait(1) } alert("done") } 1 Quote Link to post Share on other sites
Brutal 164 Posted April 25, 2015 Author Report Share Posted April 25, 2015 Thanks Darryl, thats a great solution. 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.