Skip to content

Commit 1033018

Browse files
committed
fix: installer window can lose focus and pause AHK auto-installer
1 parent 287bacd commit 1033018

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/unattented_install.ahk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
#Requires AutoHotkey v2
12
AutoInstall(installerPath) {
23
Run(installerPath)
34

45
; continuously click controls with specific text if window is active
56
loop {
7+
; ensure the target process window always has focus
8+
if WinExist("ahk_exe " . processName)
9+
WinActivate("ahk_exe " . processName)
610
if !ProcessExist(processName)
711
break
812
if WinActive("ahk_exe " . processName) {

0 commit comments

Comments
 (0)