Trying to open a LOT of crates in Injustice...
Posted: 17 Jul 2018, 13:12
Hi, I'm writing a simple script to open a ton of crates for me, but I was trying to add a "toggle on/off" hotkey so i can move between the crate types when needed without it spamming keys. It works fine without the toggle code, but somehow I can't get this to work:
Can anyone help a newb out?
Code: Select all
#z::ToggleFunc()
#Persistent
SetTimer, KeyPresser, 500
ToggleFunc()
{
if (isDisabled = 1)
{
isDisabled = 0
}
else
{
isDisabled = 1
}
}
Return
KeyPresser:
if WinActive("ahk_class LaunchUnrealUWindowsClient")
{
if isDisabled
{
Return
}
Send, {a down}
Sleep 20
Send, {a up}
}
Return