Skip to content

Commit 8720d76

Browse files
authored
Removed Suspend limitation
Special thanks to Helgef on the AHK forums: Suspend may now be used on a paused script
1 parent f902778 commit 8720d76

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/Lib/fileList.ahk

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,22 @@
9696
return this.scripts[scriptName].thread.pause()
9797
}
9898

99-
suspend(scriptName){
99+
suspend(scriptName){ ; Helgef - https://autohotkey.com/boards/viewtopic.php?p=207480#p207480
100+
static WM_COMMAND := 0x111
101+
static ID_FILE_SUSPEND := 65404
102+
local dhwLast
103+
100104
if(this.scripts[scriptName].dll="Mini")
101105
msgbox,,Limitation Error,Mini DLL doesn't support hotkeys.
102-
else
103-
this.scripts[scriptName].thread.exec("Suspend")
106+
else{
107+
if(a_detectHiddenWindows="Off"){
108+
dhwLast:=a_detectHiddenWindows
109+
detectHiddenWindows,on
110+
}
111+
postMessage,WM_COMMAND,ID_FILE_SUSPEND,,,% "ahk_id " this.scripts[scriptName].thread.varGet("a_scripthwnd")
112+
if(dhwLast)
113+
detectHiddenWindows,% dhwLast
114+
}
104115
}
105116

106117
getStateAll(){

0 commit comments

Comments
 (0)