Sleep command executes before other code.

Report problems with documented functionality
User avatar
Delta Pythagorean
Posts: 420
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Equestria

Sleep command executes before other code.

Post by Delta Pythagorean » 14 May 2018, 22:33

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.
lexikos
Posts: 6175
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Sleep command executes before other code.

Post by lexikos » 15 May 2018, 02:25

What you describe is not possible.

Perhaps the commands are executing in the correct order, and you are simply not seeing the results immediately.
swagfag
Posts: 1221
Joined: 11 Jan 2017, 17:59

Re: Sleep command executes before other code.

Post by swagfag » 15 May 2018, 03:16

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
Post Reply

Return to “Bug Reports”