Code: Select all
Gui, New, -MinimizeBox, Test
Gui, Add, Text, x0 y10 w300 h50 Center, While moving this window around by the title bar, press Q.`nWhen it freezes, press Esc to exit the script.
Gui, Show, h50 w300, Test
Return
Esc::ExitApp
q::WinWaitNotActive, Test
I ran into this because I have a script that sets a timer which, when it goes off, checks whether the GUI window is active, and I happened to be moving the window when the timer went off.
I should add that this is with v1.1.26.01 and I'm on Windows 10 x64.
Edit: If anyone stumbles upon this, a workaround that I've found is to simply precede the WinWaitNotActive line with If !(GetKeyState("LButton", "P")), so that it doesn't process it if the user is pressing the left mouse button, since he might be dragging the window around.