Jump to content
Sign in to follow this  

Trying to delay script

Recommended Posts


Hi everybody,

I'm trying to set a time to delay the script. I want to use the value which is given in the GUI (between 0 and 10).


$time1 = GuiCtrlCreateInput("5", 10, 95, 50, 20)


GUICtrlSetLimit(-1, 10, 0)

For $i = 1 To 2 Step 1

$Step = 1 + $i


MouseClick("left", 32, 388, 1, 1)

$time = $time1 * 1000

$timer = TimerInit()

While TimerDiff($timer) < $time




The problem I've got is that the time is set to about 7 seconds, whatever the input is!!

Electron microscopes rule!!!

Share this post

Link to post
Share on other sites


To get the value from the control you use GUICtrlRead($time1), otherwise you're just using the control id (which could be the number 7).

Broken link? PM me and I'll send you the file!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this