UPDATE:
I was using the script below, but it turns out that it is semi broken. Basically, I have three hotkey commands. Ctrl + Shift + [ starts an endless game suicide loop so I can can stay dead and spectate the game as a dead player. Ctrl + Shift + } is supposed to rename my character and end the suicide loop so I can start playing the game using my spare lives. And Ctrl + Shift + / just sends a command to press Home which is left-click in the game. The problem is that Ctrl + Shift + ] does not actually break the loop. It will rename my game character as I want by ControlSending F8 which is the keybind in the game to rename my character, but the automated nonstop suicide loop from Ctrl + Shift + [ never stops.
The script is below if someone can figure out what the problem is.
Code: Select all
#Requires AutoHotkey v2.0
target := 'ahk_exe svencoop.exe'
#HotIf WinExist(target)
^+[:: {
global BreakLoop
BreakLoop := False
Sleep(2000), ControlSend('{F7}')
Loop {
If (BreakLoop = True)
Break
Sleep( 500), ControlSend('{F10}')
Sleep( 500), ControlSend('{F10}')
Sleep(2500), ControlSend('{Home}')
Loop 2
Sleep( 25), ControlSend('{Space}')
Loop 15
Sleep(4000), ControlSend('{F10}')
}}
^+]:: {
global BreakLoop
BreakLoop := True
Sleep( 500), ControlSend('{F8}')
}
^+\:: {
Sleep(100), ControlSend('{Home}')
}
#HotIf