Skip to content
This repository was archived by the owner on Aug 10, 2025. It is now read-only.

Commit c93993e

Browse files
author
Jared K
committed
fix executing on wrong window
1 parent 141881f commit c93993e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

AFB.ahk

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,19 @@ F1:: {
4141
BlockInput(True)
4242

4343
WinActivate(robloxID)
44-
WinGetPos(&winX, &winY, &winWidth, &winHeight, robloxID)
45-
46-
Reconnect(winWidth, winHeight)
44+
if (WinWaitActive(robloxID, , 10)) {
45+
WinGetPos(&winX, &winY, &winWidth, &winHeight, robloxID)
46+
Reconnect(winWidth, winHeight)
47+
BreakAFK()
48+
}
4749

48-
BreakAFK()
50+
BlockInput(False)
51+
; END OF WORK
4952

5053
if (lastID && lastID != robloxID) {
5154
WinActivate(lastID)
55+
WinWaitActive(lastID, , 1)
5256
}
53-
BlockInput(False)
54-
; END OF WORK
5557

5658
antiKickInterval := GetIntervalMins()
5759
sleep(antiKickInterval)

0 commit comments

Comments
 (0)