Sometimes script works, sometimes not
Posted: 29 Apr 2019, 00:34
AHK will not always work in Evolution GT
The automated section of script works 100% of the time, while everything below WinWaitClose, fails to work sometimes.
When script fails and close game, AHK continues to run, as ExitApp does not work. When I re-launch the game a second time,
the entire script works 100% of the time and ExitApp works when game is closed.
Running latest version of AHK and windowed or full-screen borderless windowed-mode do not help.
Any ideas?
Code: Select all
sleep, 7500
send {enter down}
sleep, 50
send {enter up}
sleep, 500
send {enter down}
sleep, 50
send {enter up}
sleep, 100
send {enter down}
sleep, 50
send {enter up}
sleep, 500
send {enter down}
sleep, 50
send {enter up}
sleep, 2500
send {down down}
sleep, 50
send {down up}
sleep, 100
send {enter down}
sleep, 50
send {enter up}
sleep, 100
#IfWinActive ahk_exe EGT.exe ;tried with / without this line
#IfWinActive Evolution GT ahk_class Evolution GT ;tried with / without this line
WinWait, ahk_exe EGT.exe
WinWaitClose, ahk_exe EGT.exe ;all below this line fails sometimes
ExitApp
return
$F12::ExitApp
return
e::up
d::down
s::left
f::right
t::esc
XButton1::y
XButton2::u
$RButton::
{
send {q down}{enter down}
keywait, RButton
send {q up}{enter up}
}
return
MButton::
{
send {esc down}
sleep, 20
send {esc up}
sleep, 250
send {down down}
sleep, 20
send {down up}
sleep, 20
send {enter down}
sleep, 20
send {enter up}
sleep, 1000
send {down down}
sleep, 20
send {down up}
sleep, 20
send {enter down}
sleep, 20
send {enter up}
sleep, 500
send {enter down}
sleep, 20
send {enter up}
sleep, 100
}
return
WheelUp::
{
send {up down}
sleep, 50
send {up up}
}
return
WheelDown::
{
send {down down}
sleep, 50
send {down up}
}
return
When script fails and close game, AHK continues to run, as ExitApp does not work. When I re-launch the game a second time,
the entire script works 100% of the time and ExitApp works when game is closed.
Running latest version of AHK and windowed or full-screen borderless windowed-mode do not help.
Any ideas?