18 Commits
main ... cyka

Author SHA1 Message Date
701311f2b7 Fix explosion after closing all windows 2025-12-23 12:33:38 +01:00
3c169c41ac Update 2025-12-23 12:31:13 +01:00
e2f42a399a Instead of waiting try to ignore the toggle key itself
Hallucinated... But it seems to work???
2025-12-20 21:30:05 +01:00
ec2a7aef70 Wait for some ms before activating auto next 2025-12-20 21:26:09 +01:00
7283fc975c Switch windows on keyup instead of keydown 2025-12-20 20:34:00 +01:00
b29c1bed4f Make try menu actually suspend 2025-12-19 13:26:23 +01:00
5d960e3882 Make tray icon reload instead of open 2025-12-19 12:47:46 +01:00
e95e619aac Update 2025-12-19 09:42:06 +01:00
1c13e512c0 Update 2025-12-17 12:17:52 +01:00
a05ddb4c64 Have forwards and backwards trigger only while eve is up 2025-12-17 09:31:26 +01:00
206140ee1e Separate forwards and cycle into 2 keys 2025-12-17 09:27:49 +01:00
a17efe97e5 Disable window cycling if manually switching to window 2025-12-17 09:02:53 +01:00
1f77ab607a Update config 2025-12-17 08:54:05 +01:00
13456d92ac Fix click not registering with games in cycle 2025-12-17 08:34:16 +01:00
a6b230d7da Update config 2025-12-17 08:30:16 +01:00
33bc259ab1 Hallucinate up an auto forward feature 2025-12-17 08:30:13 +01:00
6c2022ca2b Update 2025-12-17 07:57:51 +01:00
g0nzo83
ace311634b Add new functions
Add Option to disable Thumbnails completly.
Add function to cycle through clients in char-selection screen.
Maintain Thumbnailposition if the clients goes into char-selection screen.

Co-Authored-By: cryonox <113977326+cryonox@users.noreply.github.com>
2025-04-21 12:42:52 +02:00
8 changed files with 626 additions and 142 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +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

@@ -2,6 +2,8 @@
( (
{ {
"global_Settings": { "global_Settings": {
"CharScreenHotkey":"",
"DisableLiveThumbnail": 0,
"Suspend_Hotkeys_Hotkey": "", "Suspend_Hotkeys_Hotkey": "",
"Global_Hotkeys": 1, "Global_Hotkeys": 1,
"LastUsedProfile": "Default", "LastUsedProfile": "Default",

View File

@@ -26,7 +26,7 @@ A_MaxHotKeysPerInterval := 10000
TODO ######################### TODO #########################
*/ */
;@Ahk2Exe-Let U_version = 1.0.4. ;@Ahk2Exe-Let U_version = 1.0.5.
;@Ahk2Exe-SetVersion %U_version% ;@Ahk2Exe-SetVersion %U_version%
;@Ahk2Exe-SetFileVersion %U_version% ;@Ahk2Exe-SetFileVersion %U_version%
;@Ahk2Exe-SetCopyright gonzo83 ;@Ahk2Exe-SetCopyright gonzo83
@@ -45,12 +45,11 @@ if !(A_IsCompiled)
TraySetIcon("icon.ico",,true) TraySetIcon("icon.ico",,true)
; Catch all unhandled Errors to prevent the Script from stopping ; Catch all unhandled Errors to prevent the Script from stopping
OnError(Error_Handler)
;OnError(Error_Handler)
Call := Main_Class() Call := Main_Class()
Load_JSON() { Load_JSON() {
DJSON := JSON.Load(default_JSON) DJSON := JSON.Load(default_JSON)
if !(FileExist("EVE-X-Preview.json")) { if !(FileExist("EVE-X-Preview.json")) {
@@ -60,10 +59,6 @@ Load_JSON() {
} }
else { else {
Try { Try {
if (FileExist("EVE-X-Preview.json")) {
;if needed because of Backward combativity from the alpha versions
MergeJson()
}
_JSON := JsonMergeNoOverwrite( _JSON := JsonMergeNoOverwrite(
DJSON, DJSON,
JSON.Load(FileRead("EVE-X-Preview.json")) JSON.Load(FileRead("EVE-X-Preview.json"))
@@ -97,57 +92,6 @@ JsonMergeNoOverwrite(obj1, obj2) {
return obj2 return obj2
} }
;THis function is only used to merge the Json from old versions into the new one
MergeJson(Settingsfile := "EVE-X-Preview.json", dJson := JSON.Load(default_JSON)) {
;Load the content from the existing Json File
fileObj := FileOpen(Settingsfile,"r", "Utf-8")
JsonRaw := fileObj.Read(), fileObj.Close()
OldJson := JSON.Load(JsonRaw)
savetofile := 0
for Profiles, settings in OldJson["_Profiles"] {
if (Profiles = "Default") {
continue
}
dJson["_Profiles"][Profiles] := Map()
for k, v in settings {
if (OldJson["_Profiles"][Profiles].Has("ClientPossitions")) {
savetofile := 1
if (k = "ClientPossitions")
dJson["_Profiles"][Profiles]["Client Possitions"] := v
else if (k = "ClientSettings")
dJson["_Profiles"][Profiles]["Client Settings"] := v
else if (k = "ThumbnailSettings")
dJson["_Profiles"][Profiles]["Thumbnail Settings"] := v
else if (k = "ThumbnailPositions")
dJson["_Profiles"][Profiles]["Thumbnail Positions"] := v
else if (k = "Thumbnail_visibility")
dJson["_Profiles"][Profiles]["Thumbnail Visibility"] := v
else if (k = "Custom_Colors")
dJson["_Profiles"][Profiles]["Custom Colors"] := dJson["_Profiles"]["Default"]["Custom Colors"]
else if (k = "Hotkey_Groups")
dJson["_Profiles"][Profiles]["Hotkey Groups"] := v
else if (k = "Hotkeys") {
if (Type(v) = "Map") {
Arr := []
for char, hotkey in v
Arr.Push(Map(char, hotkey))
dJson["_Profiles"][Profiles]["Hotkeys"] := Arr
}
}
}
}
}
if savetofile {
dJson["global_Settings"] := OldJson["global_Settings"]
fileObj := FileOpen(Settingsfile,"w", "Utf-8")
fileObj.Write(JSON.Dump(dJson,, " ")), fileObj.Close()
}
}
; Hanles unmanaged Errors ; Hanles unmanaged Errors
Error_Handler(Thrown, Mode) { Error_Handler(Thrown, Mode) {
return -1 return -1

View File

@@ -1,6 +1,4 @@
 Class Main_Class extends ThumbWindow {
Class Main_Class extends ThumbWindow {
Static WM_DESTROY := 0x02, Static WM_DESTROY := 0x02,
WM_SIZE := 0x05, WM_SIZE := 0x05,
WM_NCCALCSIZE := 0x83, WM_NCCALCSIZE := 0x83,
@@ -40,6 +38,12 @@ Class Main_Class extends ThumbWindow {
EventHooks := Map() EventHooks := Map()
ThumbWindows := {} ThumbWindows := {}
ThumbHwnd_EvEHwnd := Map() 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() { __New() {
@@ -68,6 +72,7 @@ Class Main_Class extends ThumbWindow {
; The Timer property for Asycn Minimizing. ; The Timer property for Asycn Minimizing.
this.timer := ObjBindMethod(this, "EVEMinimize") this.timer := ObjBindMethod(this, "EVEMinimize")
This.Register_CharSelectionScreen_Hotkeys()
;margins for DwmExtendFrameIntoClientArea. higher values extends the shadow ;margins for DwmExtendFrameIntoClientArea. higher values extends the shadow
This.margins := Buffer(16, 0) This.margins := Buffer(16, 0)
@@ -90,6 +95,7 @@ Class Main_Class extends ThumbWindow {
;Register the Hotkeys for cycle groups ;Register the Hotkeys for cycle groups
This.Register_Hotkey_Groups() This.Register_Hotkey_Groups()
This.BorderActive := 0 This.BorderActive := 0
This.ClientsInCharScreen := Map()
return This return This
} }
@@ -102,10 +108,20 @@ Class Main_Class extends ThumbWindow {
return return
; If any EVE Window exist ; If any EVE Window exist
if (WinList.Length) { if (WinList.Length) {
try {
;Check if a window exist without Thumbnail and if the user is in Character selection screen or not ;Check if a window exist without Thumbnail and if the user is in Character selection screen or not
for index, hwnd in WinList { for index, hwnd in WinList {
WinList.%hwnd% := { Title: This.CleanTitle(WinGetTitle(hwnd)) } WinList.%hwnd% := { Title: This.CleanTitle(WinGetTitle(hwnd)) }
if (WinList.%hwnd%.Title == "") {
This.ClientsInCharScreen[hwnd] := WinList.%hwnd%.Title
}
;if the User disables the Thumbnails we can skip all the code below this
if (This.DisableLiveThumbnail) {
This.DisableLiveThumb(hwnd, WinList.%hwnd%.Title, WinList)
continue
}
if !This.ThumbWindows.HasProp(hwnd) { if !This.ThumbWindows.HasProp(hwnd) {
This.EVE_WIN_Created(hwnd, WinList.%hwnd%.title) This.EVE_WIN_Created(hwnd, WinList.%hwnd%.title)
if (!This.HideThumbnailsOnLostFocus) if (!This.HideThumbnailsOnLostFocus)
@@ -114,14 +130,20 @@ Class Main_Class extends ThumbWindow {
} }
;if in Character selection screen ;if in Character selection screen
else if (This.ThumbWindows.HasProp(hwnd)) { else if (This.ThumbWindows.HasProp(hwnd)) {
if (This.ThumbWindows.%hwnd%["Window"].Title != WinList.%hwnd%.Title) { if (This.ThumbWindows.%hwnd%["Window"].Title != WinList.%hwnd%.Title && WinList.%hwnd%.Title = "") {
This.ThumbWindows.%hwnd%["Window"].Title := "Char Screen"
;This.ThumbWindows.%hwnd%["TextOverlay"]["OverlayText"].value := "Char Screen"
if (This.ThumbWindows.%hwnd%["Window"].Title == "Char Screen" && WinList.%hwnd%.Title != "") {
This.EVENameChange(hwnd, WinList.%hwnd%.Title) This.EVENameChange(hwnd, WinList.%hwnd%.Title)
} }
} }
else if (This.ThumbWindows.%hwnd%["Window"].Title != WinList.%hwnd%.Title) {
This.EVENameChange(hwnd, WinList.%hwnd%.Title)
}
} }
} }
catch
return
try { try {
;if HideThumbnailsOnLostFocus is selectet check if a eve window is still in foreground, runs a timer once with a delay to prevent stuck thumbnails ;if HideThumbnailsOnLostFocus is selectet check if a eve window is still in foreground, runs a timer once with a delay to prevent stuck thumbnails
@@ -189,12 +211,13 @@ Class Main_Class extends ThumbWindow {
static registerGroups := 0 static registerGroups := 0
;if the user has set Hotkeys in Options ;if the user has set Hotkeys in Options
if (This._Hotkeys[title]) { 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 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 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) { 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 { try {
Hotkey This._Hotkeys[title], (*) => This.ActivateEVEWindow(,,title), "P1" Hotkey hk, (*) => This.ActivateEVEWindow(,,title), "P1"
} }
catch ValueError as e { catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" ) MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
@@ -203,9 +226,9 @@ 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 ;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 ;This makes it possible to still use all keys outside from EVE
else { else {
HotIf (*) => WinExist("EVE - " title ) && WinActive(This.EVEExe) HotIf (*) => WinExist("EVE - " title ) && WinActive(This.EVEExe) && !This.HasExtraModifiers(hk)
try { try {
Hotkey This._Hotkeys[title], (*) => This.ActivateEVEWindow(,,title),"P1" Hotkey hk, (*) => This.ActivateEVEWindow(,,title),"P1"
} }
catch ValueError as e { catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" ) MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
@@ -214,54 +237,289 @@ Class Main_Class extends ThumbWindow {
} }
} }
; 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(){
if (This.CharScreenHotkey != "" ) {
HotIf (*) => WinExist("ahk_exe " This.EVEExe)
try {
Hotkey(This.CharScreenHotkey, ObjBindMethod(This, "CycleCharScreen"),"P1" )
}
}
}
CycleCharScreen(*){
static Index := 1
Arr := []
list := ""
WinList := WinGetList(This.EVEExe)
if (WinList != "") {
for index, hwnd in WinList {
if (This.CleanTitle(WinGetTitle(hwnd)) = "")
Arr.Push(hwnd)
}
if (Arr.Length >= 1 ) {
for i, hwnds in Arr {
list .= hwnds ","
}
list := Sort(list, "N D,")
Arr := StrSplit(list, ",")
Arr.Pop()
for i, hwnds in Arr {
index := i
if (WinActive("ahk_id " hwnds)) {
index := i + 1
if (index > Arr.Length)
index := 1
break
}
else {
index := 1
}
}
This.ActivateEVEWindow(Arr[index],,)
}
}
}
;Register the Hotkeys for cycle Groups if any set ;Register the Hotkeys for cycle Groups if any set
Register_Hotkey_Groups() { Register_Hotkey_Groups() {
static Fkey := "", BKey := "", Arr := [] static Fkey := "", BKey := "", Arr := []
if (IsObject(This.Hotkey_Groups) && This.Hotkey_Groups.Count != 0) { if (IsObject(This.Hotkey_Groups) && This.Hotkey_Groups.Count != 0) {
for k, v in This.Hotkey_Groups { 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 ; 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) { if(This.Global_Hotkeys) {
if( v["ForwardsHotkey"] != "" ) { HotIf ObjBindMethod(This, "OnWinExist", v["Characters"])
Fkey := v["ForwardsHotkey"], Arr := v["Characters"] } else {
HotIf ObjBindMethod(This, "OnWinExist", Arr) HotIf ObjBindMethod(This, "OnWinActive", v["Characters"])
}
try { 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 { 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) }
; 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 { try {
Hotkey( v["BackwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") ActiveTitle := This.CleanTitle(WinGetTitle("A"))
} This.AutoForwardVisited[groupIdx].Push(ActiveTitle)
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 { ; Register a low-level input hook for auto-forward
if( v["ForwardsHotkey"] != "" ) { RegisterAutoForwardHook() {
Fkey := v["ForwardsHotkey"], Arr := v["Characters"] ; Use low-level keyboard hook to catch ALL keys including with modifiers
HotIf ObjBindMethod(This, "OnWinActive", Arr) 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 { try {
Hotkey( v["ForwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"ForwardsHotkey"), "P1") currentWindow := WinGetID("A")
} ; Only process if this window hasn't been processed yet
catch ValueError as e { if (currentWindow != This.AutoForwardProcessedWindow) {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " - Hotkey Groups - " k " - Forwards Hotkey" ) This.AutoForwardProcessedWindow := currentWindow
; Must defer out of hook context
SetTimer(ObjBindMethod(This, "TriggerAutoForward"), -1)
} }
} }
if( v["BackwardsHotkey"] != "" ) { }
Fkey := v["BackwardsHotkey"], Arr := v["Characters"] }
HotIf ObjBindMethod(This, "OnWinActive", Arr) 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 { try {
Hotkey( v["BackwardsHotkey"], ObjBindMethod(This, "Cycle_Hotkey_Groups",Arr,"BackwardsHotkey"), "P1") 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)
} }
catch ValueError as e { }
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkey Groups - " k " - Backwards Hotkey" ) }
}
; 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
} }
} }
} }
@@ -290,7 +548,7 @@ Class Main_Class extends ThumbWindow {
Index := 1 Index := 1
} }
} }
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index])) This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]), true)
} }
} }
} }
@@ -309,7 +567,7 @@ Class Main_Class extends ThumbWindow {
Index := length Index := length
} }
} }
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index])) This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]), true)
} }
} }
@@ -321,6 +579,18 @@ Class Main_Class extends ThumbWindow {
return false return false
} }
} }
DisableLiveThumb(hwnd, title, arr) {
for hwnds, name in This.ThumbWindows.Clone().OwnProps() {
if (!arr.HasProp(hwnds)) {
This.ThumbWindows.DeleteProp(hwnds)
}
}
if !(This.ThumbWindows.HasProp(hwnd)) {
This.ThumbWindows.%hwnd% := ""
This.RegisterHotkeys(title, hwnd)
}
}
; To Check if atleast One Win stil Exist in the Array for the cycle groups hotkeys ; To Check if atleast One Win stil Exist in the Array for the cycle groups hotkeys
OnWinExist(Arr, *) { OnWinExist(Arr, *) {
@@ -469,7 +739,7 @@ Class Main_Class extends ThumbWindow {
;if a EVE Window got closed this destroyes the Thumbnail and frees the memory. ;if a EVE Window got closed this destroyes the Thumbnail and frees the memory.
EvEWindowDestroy(hwnd?, WinTitle?) { EvEWindowDestroy(hwnd?, WinTitle?) {
if (IsSet(hwnd) && This.ThumbWindows.HasProp(hwnd)) { 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") if (K = "Thumbnail")
continue continue
v.Destroy() v.Destroy()
@@ -479,12 +749,13 @@ Class Main_Class extends ThumbWindow {
Return Return
} }
;If a EVE Windows get destroyed ;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)) { if (!WinExist("Ahk_Id " Win_Hwnd)) {
for k,v in This.ThumbWindows.Clone().%Win_Hwnd% { if (IsObject(v))
for k, guiObj in v {
if (K = "Thumbnail") if (K = "Thumbnail")
continue continue
v.Destroy() guiObj.Destroy()
} }
This.ThumbWindows.DeleteProp(Win_Hwnd) This.ThumbWindows.DeleteProp(Win_Hwnd)
} }
@@ -492,7 +763,15 @@ Class Main_Class extends ThumbWindow {
This.DestroyThumbnailsToggle := 1 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 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)) { if (IsSet(hwnd) && This.ThumbHwnd_EvEHwnd.Has(hwnd)) {
hwnd := WinExist(This.ThumbHwnd_EvEHwnd[hwnd]) hwnd := WinExist(This.ThumbHwnd_EvEHwnd[hwnd])
@@ -551,7 +830,7 @@ Class Main_Class extends ThumbWindow {
; gets called by the timer to run async ; gets called by the timer to run async
EVEMinimize() { EVEMinimize() {
for EveHwnd, GuiObj in This.ThumbWindows.OwnProps() { for EveHwnd, GuiObj in This.ThumbWindows.OwnProps() {
ThumbHwnd := GuiObj["Window"].Hwnd ;ThumbHwnd := GuiObj["Window"].Hwnd
try try
WinTitle := WinGetTitle("Ahk_Id " EveHwnd) WinTitle := WinGetTitle("Ahk_Id " EveHwnd)
catch catch
@@ -734,4 +1013,3 @@ Class Main_Class extends ThumbWindow {
FileAppend(JSON.Dump(This._JSON, , " "), "EVE-X-Preview.json") FileAppend(JSON.Dump(This._JSON, , " "), "EVE-X-Preview.json")
} }
} }

View File

@@ -33,11 +33,19 @@ class Propertys extends TrayMenu {
;###################### ;######################
;## global Settings ;## global Settings
CharScreenHotkey {
get => This._JSON["global_Settings"]["CharScreenHotkey"]
set => This._JSON["global_Settings"]["CharScreenHotkey"] := value
}
DisableLiveThumbnail {
get => This._JSON["global_Settings"]["DisableLiveThumbnail"]
set => This._JSON["global_Settings"]["DisableLiveThumbnail"] := value
}
ThumbnailStartLocation[key] { ThumbnailStartLocation[key] {
get => This._JSON["global_Settings"]["ThumbnailStartLocation"][key] get => This._JSON["global_Settings"]["ThumbnailStartLocation"][key]
set => This._JSON["global_Settings"]["ThumbnailStartLocation"][key] := value set => This._JSON["global_Settings"]["ThumbnailStartLocation"][key] := value
} }
Minimizeclients_Delay { Minimizeclients_Delay {
@@ -407,7 +415,7 @@ class Propertys extends TrayMenu {
return This._JSON["_Profiles"][This.LastUsedProfile]["Hotkey Groups"] return This._JSON["_Profiles"][This.LastUsedProfile]["Hotkey Groups"]
} }
set { 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?] { ; Hotkey_Groups_Hotkeys[Name?, Hotkey?] {

View File

@@ -108,8 +108,9 @@
Global_Settings(visible?) { Global_Settings(visible?) {
This.S_Gui.Controls.Global_Settings := [] This.S_Gui.Controls.Global_Settings := []
This.S_Gui.SetFont("s10 w400") This.S_Gui.SetFont("s10 w400")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("GroupBox", "x20 y80 h280 w500") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("GroupBox", "x20 y80 h340 w500")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xp+15 yp+20 Section", "Suspend Hotkeys - Hotkey:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xp+15 yp+20 Section", "Suspend Hotkeys - Hotkey:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+20 Section", "Char selection Screen- Hotkey:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Hotkey activation Scope:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Hotkey activation Scope:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Background Color:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Background Color:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Default Location:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Default Location:")
@@ -117,9 +118,13 @@
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Snap:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Snap:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Snap Distance:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Snap Distance:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Minimize EVE Window Delay:") This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Minimize EVE Window Delay:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Disable Live Thumbnail")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Edit", "xs+230 ys-3 w150 Section vSuspend_Hotkeys_Hotkey", This.Suspend_Hotkeys_Hotkey)
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Edit", "xs+230 ys-37 w150 Section vSuspend_Hotkeys_Hotkey", This.Suspend_Hotkeys_Hotkey)
This.S_Gui["Suspend_Hotkeys_Hotkey"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj)) This.S_Gui["Suspend_Hotkeys_Hotkey"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj))
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Edit", "xp y+10 w150 Section vCharScreenHotkey", This.CharScreenHotkey)
This.S_Gui["CharScreenHotkey"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj))
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("DDL", "xp y+5 w180 vTTT vHotkey_Scoope Choose" (This.Global_Hotkeys ? 1 : 2), ["Global", "If an EVE window is Active"]) This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("DDL", "xp y+5 w180 vTTT vHotkey_Scoope Choose" (This.Global_Hotkeys ? 1 : 2), ["Global", "If an EVE window is Active"])
This.S_Gui["Hotkey_Scoope"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj)) This.S_Gui["Hotkey_Scoope"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj))
@@ -164,6 +169,9 @@
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Edit", "xp+80 yp-3 w40 vMinimizeclients_Delay", This.Minimizeclients_Delay) This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Edit", "xp+80 yp-3 w40 vMinimizeclients_Delay", This.Minimizeclients_Delay)
This.S_Gui["Minimizeclients_Delay"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj)) This.S_Gui["Minimizeclients_Delay"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj))
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("CheckBox", "xs y+10 vDisableLiveThumbnail Checked" This.DisableLiveThumbnail)
This.S_Gui["DisableLiveThumbnail"].OnEvent("Click", (obj, *) => gSettings_EventHandler(obj))
gSettings_EventHandler(obj) { gSettings_EventHandler(obj) {
if (obj.name = "Suspend_Hotkeys_Hotkey") { if (obj.name = "Suspend_Hotkeys_Hotkey") {
This.Suspend_Hotkeys_Hotkey := Trim(obj.value, "`n ") This.Suspend_Hotkeys_Hotkey := Trim(obj.value, "`n ")
@@ -208,6 +216,14 @@
This.Minimizeclients_Delay := obj.value This.Minimizeclients_Delay := obj.value
This.NeedRestart := 1 This.NeedRestart := 1
} }
else if (obj.name = "DisableLiveThumbnail") {
This.DisableLiveThumbnail := obj.value
This.NeedRestart := 1
}
else if (obj.name = "CharScreenHotkey") {
This.CharScreenHotkey := obj.value
This.NeedRestart := 1
}
SetTimer(This.Save_Settings_Delay_Timer, -200) SetTimer(This.Save_Settings_Delay_Timer, -200)
} }
} }
@@ -396,6 +412,20 @@
Hotkey_Groups.Push HKBackwards Hotkey_Groups.Push HKBackwards
This.S_Gui["BackwardsdKey"].OnEvent("Change", (obj, *) => SaveHKGroupList(obj)) 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 This.S_Gui.Controls.Profile_Settings.PsDDL["Hotkey Groups"] := Hotkey_Groups
for k, v in This.S_Gui.Controls.Profile_Settings.PsDDL["Hotkey Groups"] for k, v in This.S_Gui.Controls.Profile_Settings.PsDDL["Hotkey Groups"]
v.Visible := 0 v.Visible := 0
@@ -417,6 +447,9 @@
} }
EditObj.value := "", ForwardHKObj.value := "", BackwardHKObj.value := "" EditObj.value := "", ForwardHKObj.value := "", BackwardHKObj.value := ""
ForwardHKObj.Enabled := 1, BackwardHKObj.Enabled := 1, EditObj.Enabled := 1 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) ddlObj.Choose(ArrayIndex)
This.NeedRestart := 1 This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200) SetTimer(This.Save_Settings_Delay_Timer, -200)
@@ -430,6 +463,9 @@
ddlObj.Add(This.GetGroupList()) ddlObj.Add(This.GetGroupList())
ForwardHKObj.value := "", BackwardHKObj.value := "", EditObj.value := "" ForwardHKObj.value := "", BackwardHKObj.value := "", EditObj.value := ""
ForwardHKObj.Enabled := 0, BackwardHKObj.Enabled := 0, EditObj.Enabled := 0 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 This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200) SetTimer(This.Save_Settings_Delay_Timer, -200)
@@ -444,6 +480,12 @@
EditObj.value := text, EditObj.Enabled := 1 EditObj.value := text, EditObj.Enabled := 1
ForwardHKObj.value := This.Hotkey_Groups[ddlObj.Text]["ForwardsHotkey"], ForwardHKObj.Enabled := 1 ForwardHKObj.value := This.Hotkey_Groups[ddlObj.Text]["ForwardsHotkey"], ForwardHKObj.Enabled := 1
BackwardHKObj.value := This.Hotkey_Groups[ddlObj.Text]["BackwardsHotkey"], BackwardHKObj.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
} }
} }
@@ -464,9 +506,28 @@
else if (obj.Name = "BackwardsdKey" && ddl.Text != "") { else if (obj.Name = "BackwardsdKey" && ddl.Text != "") {
This.Hotkey_Groups[ddl.Text]["BackwardsHotkey"] := Trim(obj.value, "`n ") 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 This.NeedRestart := 1
SetTimer(This.Save_Settings_Delay_Timer, -200) 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("Reload", (*) => Reload())
TrayMenu.Add() TrayMenu.Add()
TrayMenu.Add("Exit", (*) => ExitApp()) TrayMenu.Add("Exit", (*) => ExitApp())
TrayMenu.Default := "Open" TrayMenu.Default := "Suspend Hotkeys"
MenuHandler(ItemName, ItemPos, MyMenu) { MenuHandler(ItemName, ItemPos, MyMenu) {
If (ItemName = "Exit") If (ItemName = "Exit")