Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetKeyDelay, 0, 15
SetMouseDelay, 30
#SingleInstance ,force
home::
WinGet, AhkPID, PID, A
WinGetClass, Chobobo, ahk_pid %AhkPID%
SplashTextOn,,, chobobo PID:%AhkPID% is saved
Sleep 2000
SplashTextOff
2::
If WinActive("ahk_pid %AhkPID%") & While GetKeyState("2", "P")
{
ControlSend, ahk_parent, 2, ahk_pid %AhkPID%
sleep, 30
ControlClick, x595 y412, ahk_pid %AhkPID%, , Left, 1, NA
sleep, 53
}
return
end::exitapp