diff --git a/EVE-X-Preview.json b/EVE-X-Preview.json index 9641870..73f34e5 100644 --- a/EVE-X-Preview.json +++ b/EVE-X-Preview.json @@ -180,7 +180,8 @@ "Global_Hotkeys":1, "LastUsedProfile":"Dave", "Minimize_Delay":100, - "Suspend_Hotkeys_Hotkey":"+SC029", + "Reload_Script_Hotkey":"+SC029", + "Suspend_Hotkeys_Hotkey":"!SC029", "ThumbnailBackgroundColor":"#57504E", "ThumbnailMinimumSize":{ "height":50, diff --git a/Lib/DefaultJSON.ahk b/Lib/DefaultJSON.ahk index 0005640..9274d57 100644 --- a/Lib/DefaultJSON.ahk +++ b/Lib/DefaultJSON.ahk @@ -5,6 +5,7 @@ "CharScreenHotkey":"", "DisableLiveThumbnail": 0, "Suspend_Hotkeys_Hotkey": "", + "Reload_Script_Hotkey": "", "Global_Hotkeys": 1, "LastUsedProfile": "Default", "Minimize_Delay": 100, diff --git a/src/Main_Class.ahk b/src/Main_Class.ahk index b238079..2db165b 100644 --- a/src/Main_Class.ahk +++ b/src/Main_Class.ahk @@ -70,6 +70,17 @@ } } + ; Register Hotkey for Reload Script if the user has is Set + if (This.Reload_Script_Hotkey != "") { + HotIf (*) => WinExist(This.EVEExe) + try { + Hotkey This.Reload_Script_Hotkey, ( * ) => This.Reload_Script(), "S1" + } + catch ValueError as e { + MsgBox(e.Message ": --> " e.Extra " <-- in: Global Settings -> Reload Script-Hotkey" ) + } + } + ; The Timer property for Asycn Minimizing. this.timer := ObjBindMethod(this, "EVEMinimize") This.Register_CharSelectionScreen_Hotkeys() diff --git a/src/Propertys.ahk b/src/Propertys.ahk index 023c080..6072a03 100644 --- a/src/Propertys.ahk +++ b/src/Propertys.ahk @@ -58,6 +58,11 @@ class Propertys extends TrayMenu { set => This._JSON["global_Settings"]["Suspend_Hotkeys_Hotkey"] := value } + Reload_Script_Hotkey { + get => This._JSON["global_Settings"]["Reload_Script_Hotkey"] + set => This._JSON["global_Settings"]["Reload_Script_Hotkey"] := value + } + ThumbnailBackgroundColor { get => convertToHex(This._JSON["global_Settings"]["ThumbnailBackgroundColor"]) set => This._JSON["global_Settings"]["ThumbnailBackgroundColor"] := convertToHex(value) @@ -530,6 +535,10 @@ class Propertys extends TrayMenu { SetTimer((*) => ToolTip(), -1500) } + Reload_Script(*) { + Reload() + } + Delete_Profile(*) { if (This.SelectProfile_DDL.Text = "Default") { MsgBox("You cannot delete the default settings") diff --git a/src/Settings_Gui.ahk b/src/Settings_Gui.ahk index 81ca0df..d14465b 100644 --- a/src/Settings_Gui.ahk +++ b/src/Settings_Gui.ahk @@ -109,7 +109,7 @@ This.S_Gui.Controls.Global_Settings := [] This.S_Gui.SetFont("s10 w400") 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", "Reload Script - 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", "Thumbnail Background Color:") @@ -121,8 +121,8 @@ 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-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.Controls.Global_Settings.Push This.S_Gui.Add("Edit", "xs+230 ys-37 w150 Section vReload_Script_Hotkey", This.Reload_Script_Hotkey) + This.S_Gui["Reload_Script_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"]) @@ -173,8 +173,8 @@ This.S_Gui["DisableLiveThumbnail"].OnEvent("Click", (obj, *) => gSettings_EventHandler(obj)) gSettings_EventHandler(obj) { - if (obj.name = "Suspend_Hotkeys_Hotkey") { - This.Suspend_Hotkeys_Hotkey := Trim(obj.value, "`n ") + if (obj.name = "Reload_Script_Hotkey") { + This.Reload_Script_Hotkey := Trim(obj.value, "`n ") This.NeedRestart := 1 } else if (obj.name = "Hotkey_Scoope") { @@ -804,7 +804,7 @@ Refresh_ControlValues() { ; Global Settings - This.S_Gui["Suspend_Hotkeys_Hotkey"].value := This.Suspend_Hotkeys_Hotkey + This.S_Gui["Reload_Script_Hotkey"].value := This.Reload_Script_Hotkey This.S_Gui["Hotkey_Scoope"].value := (This.Global_Hotkeys ? 1 : 2) This.S_Gui["ThumbnailBackgroundColor"].value := This.ThumbnailBackgroundColor This.S_Gui["ThumbnailStartLocationx"].value := This.ThumbnailStartLocation["x"]