I need a random pause

Getting started -basics for starting with WinTask

I need a random pause

Postby Vik on Tue Oct 21, 2014 9:19 am

My script fills a form and presses Submit, but I need a random pause between 2 form fillings. My code right now is:
WriteHTML("INPUT TEXT[NAME='sale']", sale$(i))
Pause 30 secs
I want to change the 30 secs to a random value from 1 to 30, how can I do that?
Posts: 3
Joined: Fri Jun 07, 2013 12:43 pm

Re: I need a random pause

Postby TechSupport on Wed Oct 22, 2014 8:45 am


You can use the Random WinTask function:
If a=0 then
pause a secs

As Pause 0 generates an infinite loop, I've added the If block to force a to 10 (or any value you want) in case the returned random value is 0.

WinTask Tech Support
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Getting started

Who is online

Users browsing this forum: No registered users and 1 guest