Sleep command executes before other code.

Report problems with documented functionality
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

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.

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

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: 6222
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

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 20 guests