Question

I use Sleep() through out my script. I have added a user input that allows the user to add more seconds to the Sleep()

Local $iDelayInput = GUICtrlCreateInput("0", 170, 75, 13, 20)
Local $delaySeconds = GUICtrlRead($iDelayInput)

I am trying to figure out how I can apply that to the Sleep() I have through out my script. I have

Sleep(5000+$delaySeconds&000)

but does not seem to work. Any ideas?

Was it helpful?

Solution

I believe the &000 is being treated like a string and being ignored, so you are probably getting only 5000 + the number the user enters. Try changing the Sleep command to this and see if it helps:

Sleep(5000+($delaySeconds*1000))

The line above takes the number entered by the user and multiplies it by 1000 to give you the number of milliseconds, then adds it to the existing 5000.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top