Compare commits

17 Commits

6 changed files with 497 additions and 60 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
EVE-X-Preview.json
EVE-X-Preview.exe

189
EVE-X-Preview.json Normal file
View File

@@ -0,0 +1,189 @@
{
"_Profiles":{
"Dave":{
"Client Possitions":{
"PhatPhuckDave":{
"IsMaximized":0,
"height":1440,
"width":2560,
"x":0,
"y":0
},
"Primorium":{
"IsMaximized":0,
"height":1440,
"width":2560,
"x":0,
"y":0
},
"Secundamen":{
"IsMaximized":0,
"height":1440,
"width":2560,
"x":0,
"y":0
}
},
"Client Settings":{
"AlwaysMaximize":0,
"Dont_Minimize_Clients":[
"Example Name1",
"Example Name2",
"Example Name3"
],
"MinimizeInactiveClients":0,
"TrackClientPossitions":1
},
"Custom Colors":{
"cColorActive":"0",
"cColors":{
"Bordercolor":[
"FFFFFF"
],
"CharNames":[
"Example Char"
],
"IABordercolor":[
"FFFFFF"
],
"TextColor":[
"FFFFFF"
]
}
},
"Hotkey Groups":{
"Daves":{
"AutoForwardOnKeypress":1,
"AutoForwardToggle":1,
"AutoForwardToggleHotkey":"SC029",
"BackwardsHotkey":"+Tab",
"Characters":[
"PhatPhuckDave",
"Primorium",
"Secundamen"
],
"ForwardsHotkey":"Tab"
}
},
"Hotkeys":[
{
"PhatPhuckDave":"lalt & 1"
},
{
"Primorium":"lalt & 2"
},
{
"Secundamen":"lalt & 3"
}
],
"Thumbnail Positions":{},
"Thumbnail Settings":{
"ClientHighligtBorderthickness":4,
"ClientHighligtColor":"#E36A0D",
"HideThumbnailsOnLostFocus":0,
"InactiveClientBorderColor":"#8A8A8A",
"InactiveClientBorderthickness":2,
"ShowAllColoredBorders":0,
"ShowClientHighlightBorder":1,
"ShowThumbnailTextOverlay":1,
"ShowThumbnailsAlwaysOnTop":1,
"ThumbnailOpacity":80,
"ThumbnailTextColor":"#FAC57A",
"ThumbnailTextFont":"Gill Sans MT",
"ThumbnailTextMargins":{
"x":15,
"y":5
},
"ThumbnailTextSize":12
},
"Thumbnail Visibility":{}
},
"Default":{
"Client Possitions":{},
"Client Settings":{
"AlwaysMaximize":0,
"Dont_Minimize_Clients":[
"Example Name1",
"Example Name2",
"Example Name3"
],
"MinimizeInactiveClients":0,
"TrackClientPossitions":0
},
"Custom Colors":{
"cColorActive":"0",
"cColors":{
"Bordercolor":[
"FFFFFF"
],
"CharNames":[
"Example Char"
],
"IABordercolor":[
"FFFFFF"
],
"TextColor":[
"FFFFFF"
]
}
},
"Hotkey Groups":{},
"Hotkeys":[
{
"Example Name1":"1"
},
{
"Example Name2":"ctrl & 1"
},
{
"Example Name3":"Xbutton1 & 1"
},
{
"Example Name4":"^XButton1 & 1"
}
],
"Thumbnail Positions":{},
"Thumbnail Settings":{
"ClientHighligtBorderthickness":4,
"ClientHighligtColor":"#E36A0D",
"HideThumbnailsOnLostFocus":0,
"InactiveClientBorderColor":"#8A8A8A",
"InactiveClientBorderthickness":2,
"ShowAllColoredBorders":0,
"ShowClientHighlightBorder":1,
"ShowThumbnailTextOverlay":1,
"ShowThumbnailsAlwaysOnTop":1,
"ThumbnailOpacity":80,
"ThumbnailTextColor":"#FAC57A",
"ThumbnailTextFont":"Gill Sans MT",
"ThumbnailTextMargins":{
"x":15,
"y":5
},
"ThumbnailTextSize":12
},
"Thumbnail Visibility":{}
}
},
"global_Settings":{
"CharScreenHotkey":"",
"DisableLiveThumbnail":1,
"Global_Hotkeys":1,
"LastUsedProfile":"Dave",
"Minimize_Delay":100,
"Suspend_Hotkeys_Hotkey":"",
"ThumbnailBackgroundColor":"#57504E",
"ThumbnailMinimumSize":{
"height":50,
"width":50
},
"ThumbnailSnap":1,
"ThumbnailSnap_Distance":"20",
"ThumbnailStartLocation":{
"height":140,
"width":250,
"x":20,
"y":20
}
}
}

View File

@@ -1,6 +1,4 @@

Class Main_Class extends ThumbWindow {
Class Main_Class extends ThumbWindow {
Static WM_DESTROY := 0x02,
WM_SIZE := 0x05,
WM_NCCALCSIZE := 0x83,
@@ -40,6 +38,12 @@ Class Main_Class extends ThumbWindow {
EventHooks := Map()
ThumbWindows := {}
ThumbHwnd_EvEHwnd := Map()
AutoForwardGroups := []
AutoForwardEnabled := Map() ; Map of group index => enabled state
AutoForwardVisited := Map() ; Map of group index => array of visited window names
AutoForwardToggleMode := Map() ; Map of group index => toggle mode setting
AutoForwardProcessedWindow := 0 ; Track which window hwnd already got its input processed
AutoForwardToggleVKCodes := [] ; Array of VK codes for toggle hotkeys
__New() {
@@ -207,12 +211,13 @@ Class Main_Class extends ThumbWindow {
static registerGroups := 0
;if the user has set Hotkeys in Options
if (This._Hotkeys[title]) {
hk := This._Hotkeys[title]
;if the user has selected Global Hotkey. This means the Hotkey will alsways trigger as long at least 1 EVE Window exist.
;if a Window does not Exist which was assigned to the hotkey the hotkey will be dissabled until the Window exist again
if(This.Global_Hotkeys) {
HotIf (*) => WinExist(This.EVEExe) && WinExist("EVE - " title ) && !WinActive("EVE-X-Preview - Settings")
HotIf (*) => WinExist(This.EVEExe) && WinExist("EVE - " title ) && !WinActive("EVE-X-Preview - Settings") && !This.HasExtraModifiers(hk)
try {
Hotkey This._Hotkeys[title], (*) => This.ActivateEVEWindow(,,title), "P1"
Hotkey hk, (*) => This.ActivateEVEWindow(,,title), "P1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
@@ -221,15 +226,35 @@ Class Main_Class extends ThumbWindow {
;if the user has selected (Win Active) the hotkeys will only trigger if at least 1 EVE Window is Active and in Focus
;This makes it possible to still use all keys outside from EVE
else {
HotIf (*) => WinExist("EVE - " title ) && WinActive(This.EVEExe)
HotIf (*) => WinExist("EVE - " title ) && WinActive(This.EVEExe) && !This.HasExtraModifiers(hk)
try {
Hotkey This._Hotkeys[title], (*) => This.ActivateEVEWindow(,,title),"P1"
Hotkey hk, (*) => This.ActivateEVEWindow(,,title),"P1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
}
}
}
}
; Check if extra modifiers are pressed beyond what's in the hotkey string
HasExtraModifiers(hk) {
; Check which modifiers are in the hotkey
hasCtrl := InStr(hk, "^") || InStr(hk, "ctrl", false)
hasAlt := InStr(hk, "!") || InStr(hk, "alt", false)
hasShift := InStr(hk, "+") || InStr(hk, "shift", false)
hasWin := InStr(hk, "#") || InStr(hk, "win", false)
; Return true if any modifier is pressed that's NOT in the hotkey
if (!hasCtrl && GetKeyState("Ctrl", "P"))
return true
if (!hasAlt && GetKeyState("Alt", "P"))
return true
if (!hasShift && GetKeyState("Shift", "P"))
return true
if (!hasWin && (GetKeyState("LWin", "P") || GetKeyState("RWin", "P")))
return true
return false
}
Register_CharSelectionScreen_Hotkeys(){
@@ -283,52 +308,221 @@ Class Main_Class extends ThumbWindow {
static Fkey := "", BKey := "", Arr := []
if (IsObject(This.Hotkey_Groups) && This.Hotkey_Groups.Count != 0) {
for k, v in This.Hotkey_Groups {
;If any EVE Window Exist and at least 1 character matches the the list from the group windows
if(This.Global_Hotkeys) {
if( v["ForwardsHotkey"] != "" ) {
Fkey := v["ForwardsHotkey"], Arr := v["Characters"]
HotIf ObjBindMethod(This, "OnWinExist", Arr)
; Check if auto-forward is enabled for this group
hasAutoForward := v.Has("AutoForwardOnKeypress") && v["AutoForwardOnKeypress"]
; 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")
}
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" )
}
}
; Store auto-forward groups and register separate toggle hotkey
if (hasAutoForward) {
groupIdx := This.AutoForwardGroups.Length + 1
This.AutoForwardGroups.Push(v["Characters"])
This.AutoForwardEnabled[groupIdx] := false
This.AutoForwardVisited[groupIdx] := []
This.AutoForwardToggleMode[groupIdx] := v.Has("AutoForwardToggle") ? v["AutoForwardToggle"] : true
; Register separate AutoForwardToggleHotkey if set
if (v.Has("AutoForwardToggleHotkey") && v["AutoForwardToggleHotkey"] != "") {
toggleKey := v["AutoForwardToggleHotkey"]
vkCode := GetKeyVK(toggleKey)
if (vkCode) {
found := false
for code in This.AutoForwardToggleVKCodes {
if (code = vkCode) {
found := true
break
}
}
if (!found) {
This.AutoForwardToggleVKCodes.Push(vkCode)
}
}
if(This.Global_Hotkeys) {
HotIf ObjBindMethod(This, "OnWinExist", v["Characters"])
} else {
HotIf ObjBindMethod(This, "OnWinActive", v["Characters"])
}
try {
Hotkey( v["ForwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1")
Hotkey(toggleKey, ObjBindMethod(This, "ToggleAutoForward", groupIdx, v["Characters"]), "P1")
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" )
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Auto-Forward Toggle Hotkey" )
}
}
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 {
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" )
}
}
}
; Register keyboard/mouse hook if any auto-forward groups exist
if (This.AutoForwardGroups.Length > 0) {
This.RegisterAutoForwardHook()
}
}
; Toggle auto-forward for a group
ToggleAutoForward(groupIdx, Arr, *) {
if (This.AutoForwardEnabled[groupIdx]) {
; Disable
This.AutoForwardEnabled[groupIdx] := false
This.AutoForwardVisited[groupIdx] := []
} else {
; Enable and mark current window as first visited
This.AutoForwardEnabled[groupIdx] := true
This.AutoForwardVisited[groupIdx] := []
This.AutoForwardProcessedWindow := 0 ; Reset so current window can receive input
try {
ActiveTitle := This.CleanTitle(WinGetTitle("A"))
This.AutoForwardVisited[groupIdx].Push(ActiveTitle)
}
}
}
; Register a low-level input hook for auto-forward
RegisterAutoForwardHook() {
; Use low-level keyboard hook to catch ALL keys including with modifiers
This.KeyboardHook := DllCall("SetWindowsHookEx", "Int", 13, "Ptr", CallbackCreate(ObjBindMethod(This, "LowLevelKeyboardProc"), "Fast", 3), "Ptr", 0, "UInt", 0, "Ptr")
; Use low-level mouse hook
This.MouseHook := DllCall("SetWindowsHookEx", "Int", 14, "Ptr", CallbackCreate(ObjBindMethod(This, "LowLevelMouseProc"), "Fast", 3), "Ptr", 0, "UInt", 0, "Ptr")
}
; Low-level mouse hook callback
LowLevelMouseProc(nCode, wParam, lParam) {
static WM_LBUTTONUP := 0x202, WM_RBUTTONUP := 0x205, WM_MBUTTONUP := 0x208
; Use mouse UP so the click registers in the window first
if (nCode >= 0 && (wParam = WM_LBUTTONUP || wParam = WM_RBUTTONUP || wParam = WM_MBUTTONUP)) {
if (This.IsAutoForwardActive()) {
try {
currentWindow := WinGetID("A")
; Only process if this window hasn't been processed yet
if (currentWindow != This.AutoForwardProcessedWindow) {
This.AutoForwardProcessedWindow := currentWindow
; Must defer out of hook context
SetTimer(ObjBindMethod(This, "TriggerAutoForward"), -1)
}
}
}
}
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
}
; Low-level keyboard hook callback
LowLevelKeyboardProc(nCode, wParam, lParam) {
static WM_KEYUP := 0x0101, WM_SYSKEYUP := 0x0105
if (nCode >= 0 && (wParam = WM_KEYUP || wParam = WM_SYSKEYUP)) {
vkCode := NumGet(lParam, 0, "UInt")
; Ignore modifier keys themselves
if (vkCode = 0x10 || vkCode = 0x11 || vkCode = 0x12
|| vkCode = 0x5B || vkCode = 0x5C
|| vkCode = 0xA0 || vkCode = 0xA1 || vkCode = 0xA2
|| vkCode = 0xA3 || vkCode = 0xA4 || vkCode = 0xA5) {
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
}
; Ignore toggle hotkeys
for code in This.AutoForwardToggleVKCodes {
if (code = vkCode) {
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
}
}
if (This.IsAutoForwardActive()) {
try {
currentWindow := WinGetID("A")
; Only process if this window hasn't been processed yet
if (currentWindow != This.AutoForwardProcessedWindow) {
This.AutoForwardProcessedWindow := currentWindow
; Must defer out of hook context - SetTimer -1 runs immediately after hook returns
SetTimer(ObjBindMethod(This, "TriggerAutoForward"), -1)
}
}
}
}
; Always pass to next hook
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
}
; Check if any auto-forward group window is active AND enabled
IsAutoForwardActive() {
try {
ActiveTitle := This.CleanTitle(WinGetTitle("A"))
for groupIdx, Arr in This.AutoForwardGroups {
if (This.AutoForwardEnabled[groupIdx] && This.OnWinActive(Arr)) {
for index, name in Arr {
if (name = ActiveTitle)
return true
}
}
}
}
return false
}
; Check if current window should auto-forward and trigger it
TriggerAutoForward() {
try {
ActiveTitle := This.CleanTitle(WinGetTitle("A"))
for groupIdx, Arr in This.AutoForwardGroups {
if (!This.AutoForwardEnabled[groupIdx])
continue
if (This.OnWinActive(Arr)) {
for index, name in Arr {
if (name = ActiveTitle) {
This.Cycle_Hotkey_Groups(Arr, "ForwardsHotkey")
; Update processed window to the NEW window after cycling
try This.AutoForwardProcessedWindow := WinGetID("A")
; Track visited window
try {
newTitle := This.CleanTitle(WinGetTitle("A"))
alreadyVisited := false
for visited in This.AutoForwardVisited[groupIdx] {
if (visited = newTitle) {
alreadyVisited := true
break
}
}
if (!alreadyVisited) {
This.AutoForwardVisited[groupIdx].Push(newTitle)
}
; If not toggle mode, check if all windows visited
if (!This.AutoForwardToggleMode[groupIdx]) {
existingCount := 0
for n in Arr {
if (WinExist("EVE - " n " Ahk_Exe exefile.exe"))
existingCount++
}
if (This.AutoForwardVisited[groupIdx].Length >= existingCount) {
This.AutoForwardEnabled[groupIdx] := false
This.AutoForwardVisited[groupIdx] := []
}
}
}
return
}
}
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" )
}
}
}
}
}
}
}
@@ -354,7 +548,7 @@ Class Main_Class extends ThumbWindow {
Index := 1
}
}
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]))
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]), true)
}
}
}
@@ -373,7 +567,7 @@ Class Main_Class extends ThumbWindow {
Index := length
}
}
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]))
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]), true)
}
}
@@ -545,7 +739,7 @@ Class Main_Class extends ThumbWindow {
;if a EVE Window got closed this destroyes the Thumbnail and frees the memory.
EvEWindowDestroy(hwnd?, WinTitle?) {
if (IsSet(hwnd) && This.ThumbWindows.HasProp(hwnd)) {
for k, v in This.ThumbWindows.Clone().%hwnd% {
for k, v in This.ThumbWindows.%hwnd% {
if (K = "Thumbnail")
continue
v.Destroy()
@@ -555,20 +749,29 @@ Class Main_Class extends ThumbWindow {
Return
}
;If a EVE Windows get destroyed
for Win_Hwnd,v in This.ThumbWindows.Clone().OwnProps() {
for Win_Hwnd, v in This.ThumbWindows.Clone().OwnProps() {
if (!WinExist("Ahk_Id " Win_Hwnd)) {
for k,v in This.ThumbWindows.Clone().%Win_Hwnd% {
if (K = "Thumbnail")
continue
v.Destroy()
}
if (IsObject(v))
for k, guiObj in v {
if (K = "Thumbnail")
continue
guiObj.Destroy()
}
This.ThumbWindows.DeleteProp(Win_Hwnd)
}
}
This.DestroyThumbnailsToggle := 1
}
ActivateEVEWindow(hwnd?,ThisHotkey?, title?) {
ActivateEVEWindow(hwnd?,ThisHotkey?, title?, fromAutoForward := false) {
; Disable all auto-forward groups (emergency shutoff) - but not when called from auto-forward itself
if (!fromAutoForward) {
for groupIdx in This.AutoForwardEnabled {
This.AutoForwardEnabled[groupIdx] := false
This.AutoForwardVisited[groupIdx] := []
}
}
; If the user clicks the Thumbnail then hwnd stores the Thumbnail Hwnd. Here the Hwnd gets changed to the contiguous EVE window hwnd
if (IsSet(hwnd) && This.ThumbHwnd_EvEHwnd.Has(hwnd)) {
hwnd := WinExist(This.ThumbHwnd_EvEHwnd[hwnd])
@@ -809,5 +1012,4 @@ Class Main_Class extends ThumbWindow {
FileDelete("EVE-X-Preview.json")
FileAppend(JSON.Dump(This._JSON, , " "), "EVE-X-Preview.json")
}
}
}

View File

@@ -415,7 +415,7 @@ class Propertys extends TrayMenu {
return This._JSON["_Profiles"][This.LastUsedProfile]["Hotkey Groups"]
}
set {
This._JSON["_Profiles"][This.LastUsedProfile]["Hotkey Groups"][Key] := Map("Characters", value, "ForwardsHotkey", "", "BackwardsHotkey", "")
This._JSON["_Profiles"][This.LastUsedProfile]["Hotkey Groups"][Key] := Map("Characters", value, "ForwardsHotkey", "", "BackwardsHotkey", "", "AutoForwardOnKeypress", 0, "AutoForwardToggle", 1, "AutoForwardToggleHotkey", "")
}
}
; Hotkey_Groups_Hotkeys[Name?, Hotkey?] {

View File

@@ -412,6 +412,20 @@
Hotkey_Groups.Push HKBackwards
This.S_Gui["BackwardsdKey"].OnEvent("Change", (obj, *) => SaveHKGroupList(obj))
Hotkey_Groups.Push This.S_Gui.Add("Text", "xp yp50", "Auto-Forward:")
AutoForwardCB := This.S_Gui.Add("Checkbox", "xp yp+20 Disabled vAutoForwardOnKeypress", "Forward on any keypress")
Hotkey_Groups.Push AutoForwardCB
This.S_Gui["AutoForwardOnKeypress"].OnEvent("Click", (obj, *) => SaveAutoForward(obj))
AutoForwardToggleCB := This.S_Gui.Add("Checkbox", "xp yp+20 Disabled vAutoForwardToggle", "Toggle mode (else: disable after full cycle)")
Hotkey_Groups.Push AutoForwardToggleCB
This.S_Gui["AutoForwardToggle"].OnEvent("Click", (obj, *) => SaveAutoForwardToggle(obj))
Hotkey_Groups.Push This.S_Gui.Add("Text", "xp yp+25", "Auto-Forward Toggle Hotkey:")
HKAutoForwardToggle := This.S_Gui.Add("Edit", "xp yp+20 w150 Disabled vAutoForwardToggleHotkey")
Hotkey_Groups.Push HKAutoForwardToggle
This.S_Gui["AutoForwardToggleHotkey"].OnEvent("Change", (obj, *) => SaveHKGroupList(obj))
This.S_Gui.Controls.Profile_Settings.PsDDL["Hotkey Groups"] := Hotkey_Groups
for k, v in This.S_Gui.Controls.Profile_Settings.PsDDL["Hotkey Groups"]
v.Visible := 0
@@ -433,6 +447,9 @@
}
EditObj.value := "", ForwardHKObj.value := "", BackwardHKObj.value := ""
ForwardHKObj.Enabled := 1, BackwardHKObj.Enabled := 1, EditObj.Enabled := 1
AutoForwardCB.value := 0, AutoForwardCB.Enabled := 1
AutoForwardToggleCB.value := 1, AutoForwardToggleCB.Enabled := 1
HKAutoForwardToggle.value := "", HKAutoForwardToggle.Enabled := 1
ddlObj.Choose(ArrayIndex)
This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200)
@@ -446,6 +463,9 @@
ddlObj.Add(This.GetGroupList())
ForwardHKObj.value := "", BackwardHKObj.value := "", EditObj.value := ""
ForwardHKObj.Enabled := 0, BackwardHKObj.Enabled := 0, EditObj.Enabled := 0
AutoForwardCB.value := 0, AutoForwardCB.Enabled := 0
AutoForwardToggleCB.value := 0, AutoForwardToggleCB.Enabled := 0
HKAutoForwardToggle.value := "", HKAutoForwardToggle.Enabled := 0
This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200)
@@ -460,6 +480,12 @@
EditObj.value := text, EditObj.Enabled := 1
ForwardHKObj.value := This.Hotkey_Groups[ddlObj.Text]["ForwardsHotkey"], ForwardHKObj.Enabled := 1
BackwardHKObj.value := This.Hotkey_Groups[ddlObj.Text]["BackwardsHotkey"], BackwardHKObj.Enabled := 1
AutoForwardCB.value := This.Hotkey_Groups[ddlObj.Text].Has("AutoForwardOnKeypress") ? This.Hotkey_Groups[ddlObj.Text]["AutoForwardOnKeypress"] : 0
AutoForwardCB.Enabled := 1
AutoForwardToggleCB.value := This.Hotkey_Groups[ddlObj.Text].Has("AutoForwardToggle") ? This.Hotkey_Groups[ddlObj.Text]["AutoForwardToggle"] : 1
AutoForwardToggleCB.Enabled := 1
HKAutoForwardToggle.value := This.Hotkey_Groups[ddlObj.Text].Has("AutoForwardToggleHotkey") ? This.Hotkey_Groups[ddlObj.Text]["AutoForwardToggleHotkey"] : ""
HKAutoForwardToggle.Enabled := 1
}
}
@@ -480,9 +506,28 @@
else if (obj.Name = "BackwardsdKey" && ddl.Text != "") {
This.Hotkey_Groups[ddl.Text]["BackwardsHotkey"] := Trim(obj.value, "`n ")
}
else if (obj.Name = "AutoForwardToggleHotkey" && ddl.Text != "") {
This.Hotkey_Groups[ddl.Text]["AutoForwardToggleHotkey"] := Trim(obj.value, "`n ")
}
This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200)
}
SaveAutoForward(obj) {
if (ddl.Text != "") {
This.Hotkey_Groups[ddl.Text]["AutoForwardOnKeypress"] := obj.value
This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200)
}
}
SaveAutoForwardToggle(obj) {
if (ddl.Text != "") {
This.Hotkey_Groups[ddl.Text]["AutoForwardToggle"] := obj.value
This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200)
}
}
}

View File

@@ -42,7 +42,7 @@ Class TrayMenu extends Settings_Gui {
TrayMenu.Add("Reload", (*) => Reload())
TrayMenu.Add()
TrayMenu.Add("Exit", (*) => ExitApp())
TrayMenu.Default := "Open"
TrayMenu.Default := "Suspend Hotkeys"
MenuHandler(ItemName, ItemPos, MyMenu) {
If (ItemName = "Exit")