Sleep lenght modifie using Gui Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Zseni
Posts: 53
Joined: 03 Nov 2019, 19:44

Sleep lenght modifie using Gui

12 Nov 2019, 18:42

So i have a long loop, it send a bunch of words but i put sleep in beetween so its not to fast.

Code: Select all

loop
{
     Send, test
     send, {Enter}
     sleep, 500
     Send, test
     send, {Enter}
     sleep, 1000
  
Thats bassicly the code but like 400 lines longer, with different sleep timings.
I want a way that i can adjust all sleep lengths by a certain number using my gui edit box.
So if i put the number -500 in my edit box it will minus 500 from all sleep lenghts or 500 to add 500 to all sleep durations.
But the minimum for the sleep is 0, so if its (sleep, 500 + -600) instead of being -100 its just 0
im guesing it will look something like this:

Code: Select all

Gui, Add, Edit, x200 y90 cblack w60 h15 vSleep, 0
loop
{
     Send, test
     send, {Enter}
     sleep, 500 + %Sleep% ;Something like this?
     Send, test
     send, {Enter}
     sleep, 1000 + %Sleep% ;Something like this?
Thank you in Advance.
Rohwedder
Posts: 7672
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Sleep lenght modifie using Gui

13 Nov 2019, 10:45

Hallo,
try:

Code: Select all

Sleep, 500 + Sleep
Times < 0ms are simply not executed. But the Sleep variable shouldn't be empty.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest, MrDoge and 337 guests