Here is discussed a Gui that does not block the flow of the script.
https://autohotkey.com/board/topic/9256 ... he-script/
Could you tell me how to do the opposite please? i.e. The same Gui as above, but that pauses and waits for Ok to be pressed before continuing the script?
Gui MsgBox that waits before continuing
Re: Gui MsgBox that waits before continuing
If MsgBox is presented with no options, script does not move until it's pressed.
Was that it?
Was that it?
Re: Gui MsgBox that waits before continuing
without Pause:
but u need to make sure hotkeys and subroutines(Thread Priority) are run with a priority lower than the default one
Code: Select all
#NoEnv
#SingleInstance Force
CoordMode ToolTip
global xMid := A_ScreenWidth // 2 - 50
global yMid := A_ScreenHeight // 2
Hotkey F1, Quit, P-1
global breakLoop := false
Loop
{
if breakLoop
break
ToolTip % "Iteration: " A_Index, xMid, yMid - 100
showGui()
}
MsgBox Broken. Exiting.
ExitApp
Quit:
ExitApp
return
showGui() {
static HWND := makeGui()
Gui MyGui:Show, w200
WinWaitClose % "ahk_id " HWND
}
makeGui() {
Gui MyGui:New, +Hwndhwnd, MyGui
Gui Add, Text, , Paused Execution
Gui Add, Button, , Dismiss Gui
Gui Add, Button, , Break Loop
return hwnd
MyGuiButtonDismissGui:
Loop % i := 3
{
ToolTip % "Resuming in: " i - A_Index + 1, xMid, yMid + 50, 2
Sleep 1000
}
ToolTip, , , , 2
Gui MyGui:Submit
Return
MyGuiButtonBreakLoop:
breakLoop := true
Gui MyGui:Submit
Return
}
Re: Gui MsgBox that waits before continuing
That's all kind of fascinating and great, thanks swagfag ...
What does the line "Hotkey F1, Quit, P-1" do? P-1??
I think I understand most of it, really great, though it has to be this complex to make a Gui stop and wait?
"but u need to make sure hotkeys and subroutines(Thread Priority) are run with a priority lower than the default one"
How do I do that?
"without Pause:" is it easier with this Pause method?
What does the line "Hotkey F1, Quit, P-1" do? P-1??
I think I understand most of it, really great, though it has to be this complex to make a Gui stop and wait?
"but u need to make sure hotkeys and subroutines(Thread Priority) are run with a priority lower than the default one"
How do I do that?
"without Pause:" is it easier with this Pause method?