diff --git a/src/Main_Class.ahk b/src/Main_Class.ahk index edea090..b157d71 100644 --- a/src/Main_Class.ahk +++ b/src/Main_Class.ahk @@ -310,53 +310,26 @@ ; Check if auto-forward is enabled for this group hasAutoForward := v.Has("AutoForwardOnKeypress") && v["AutoForwardOnKeypress"] - ;If any EVE Window Exist and at least 1 character matches the the list from the group windows - if(This.Global_Hotkeys) { - ; ForwardsHotkey always does normal cycling - if( v["ForwardsHotkey"] != "" ) { - Fkey := v["ForwardsHotkey"], Arr := v["Characters"] - HotIf ObjBindMethod(This, "OnWinExist", Arr) - try { - Hotkey( v["ForwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1") - } - catch ValueError as e { - MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" ) - } + ; ForwardsHotkey and BackwardsHotkey only trigger when EVE window is active + if( v["ForwardsHotkey"] != "" ) { + Fkey := v["ForwardsHotkey"], Arr := v["Characters"] + HotIf ObjBindMethod(This, "OnWinActive", Arr) + try { + Hotkey( v["ForwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1") } - if( v["BackwardsHotkey"] != "" ) { - Fkey := v["BackwardsHotkey"], Arr := v["Characters"] - HotIf ObjBindMethod(This, "OnWinExist", Arr) - try { - Hotkey( v["BackwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") - } - catch ValueError as e { - MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkey Groups - " k " - Backwards Hotkey" ) - } - } - } - ;If any EVE Window is Active - else { - ; ForwardsHotkey always does normal cycling - if( v["ForwardsHotkey"] != "" ) { - Fkey := v["ForwardsHotkey"], Arr := v["Characters"] - HotIf ObjBindMethod(This, "OnWinActive", Arr) - try { - Hotkey( v["ForwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1") - } - catch ValueError as e { - MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" ) - } + catch ValueError as e { + MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" ) + } + } + if( v["BackwardsHotkey"] != "" ) { + Fkey := v["BackwardsHotkey"], Arr := v["Characters"] + HotIf ObjBindMethod(This, "OnWinActive", Arr) + try { + Hotkey( v["BackwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") + } + catch ValueError as e { + MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkey Groups - " k " - Backwards Hotkey" ) } - if( v["BackwardsHotkey"] != "" ) { - Fkey := v["BackwardsHotkey"], Arr := v["Characters"] - HotIf ObjBindMethod(This, "OnWinActive", Arr) - try { - Hotkey( v["BackwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") - } - catch ValueError as e { - MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkey Groups - " k " - Backwards Hotkey" ) - } - } } ; Store auto-forward groups and register separate toggle hotkey if (hasAutoForward) {