Sleep command executes before other code.

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

Sleep command executes before other code.

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: 6045
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Sleep command executes before other code.

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: 959
Joined: 11 Jan 2017, 17:59

Re: Sleep command executes before other code.

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] [Download] GeSHi © Codebox Plus

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

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests