running the script, as long you press always manually the Msgbox-Button all runs fine. But when let the Msgbox run in the 1 secs Timeout whole script is blocked, and nothing works.
Did i make a mistake?
Code: Select all
Gui, SelectRef:Add, Button, gSelectRefButtonOK w250 h60 , Can you press me (click to repeat)?
Gui, SelectRef: -SysMenu HwndHwndSelectRef
Process, Exist
PID=%Errorlevel%
GroupAdd, SelectRef, ahk_pid %PID% ahk_id %HwndSelectRef%
Gui, SelectRef:Show, Hide AutoSize Center, Example
Gui, SelectRef:Default
loop {
Msgbox, 0x2040, , DONT PRESS OK NOW!, 1 ; Dont CLICK OK, let in run in TIMEOUT!
Gui, SelectRef:Show,,Example
WinWaitClose, ahk_group SelectRef ; ONLY hangs here, when Msgbox above runs in TimeOut
}
Exitapp ; never reached
SelectRefButtonOK:
Gui, SelectRef:Submit
Return