Jump to content

Recommended Posts

Posted

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).

CODE

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

GuiCtrlCreateUpDown($time1)

GUICtrlSetLimit(-1, 10, 0)

For $i = 1 To 2 Step 1

$Step = 1 + $i

Opt("mouseclickdowndelay",1500)

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

$time = $time1 * 1000

$timer = TimerInit()

While TimerDiff($timer) < $time

Sleep(20)

WEnd

Next

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

Electron microscopes rule!!!
Posted

Hi!

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!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...