Page 1 of 1

Sleep command executes before other code.

Posted: 14 May 2018, 22:33
by Delta Pythagorean
I've been having this problem, especially in newer scripts where I have a command before the sleep command, and it sleeps for the specified amount of time before the other code is. I'm curious if it's Windows 10's sleep function being weird or something related to AHK. Either way, it's quite confusing to encounter at first.

Re: Sleep command executes before other code.

Posted: 15 May 2018, 02:25
by lexikos
What you describe is not possible.

Perhaps the commands are executing in the correct order, and you are simply not seeing the results immediately.

Re: Sleep command executes before other code.

Posted: 15 May 2018, 03:16
by swagfag
can u provide a sample, which illustrates the issue, or do you mean sleep statements in general

the following:

Code: Select all

Sleep, 1000
ToolTip, % "First", 500, 500
Sleep, 1000
ToolTip, % "Second", 500, 500
Esc::ExitApp
win10 x64 ahk-l 1.1.28.02 w64 works for me as expected