39 Commits
main ... cyka

Author SHA1 Message Date
3b7166732b Update 2026-01-07 12:41:35 +01:00
1ece6a3be0 Fix lag evaluating ExtraModifiers every keydown 2026-01-04 20:11:05 +01:00
85853fe781 Update 2026-01-04 13:00:25 +01:00
213d8c0496 Tint character name red if disabled 2026-01-04 13:00:24 +01:00
6edc063d3a Make the character group manipulation transient 2026-01-03 18:50:07 +01:00
fab35f1cd5 When removing and adding characters to groups try to add them to the indices they previously were at 2026-01-03 18:45:40 +01:00
29f3146920 Fix issue where adding character to group did not work for windows
focused manually or automatically (by user or windows)
2026-01-03 18:45:40 +01:00
323abc232e Implement a hotkey to add clients to the group on the fly 2026-01-03 14:55:00 +01:00
e11ab4037d Add a hotkey to add character to current group 2026-01-03 12:18:47 +01:00
673c647be0 Update 2026-01-03 12:01:44 +01:00
f333011ac1 Add a delay before tabbing to new window in auto 2026-01-03 00:53:44 +01:00
104de0e8bc Make the text configurable maybe 2026-01-02 20:05:56 +01:00
b5a135b3f5 Render character name on screen 2026-01-02 19:42:21 +01:00
31cf11cdd5 Fix the race condition when clicking fast on auto forward 2026-01-02 19:20:25 +01:00
3e72309de4 Update 2026-01-02 18:10:20 +01:00
a3c60c6588 Reverse the 4 and 6 actually 2026-01-02 16:16:55 +01:00
3939c8b289 Map mouse wheel to numpad 46 to switch targets :D 2026-01-02 16:10:53 +01:00
735de82b95 Have tray menu open settings 2026-01-02 16:00:20 +01:00
fa4739c3ac Close when closing 2026-01-01 02:05:53 +01:00
dbe9913b8a Replace suspend with reload
Although both are supported via the json config file
2025-12-31 20:27:08 +01:00
56abcd95a5 Update 2025-12-31 20:16:13 +01:00
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 1315 additions and 148 deletions

2
.gitignore vendored Normal file
View File

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

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

@@ -0,0 +1,437 @@
{
"_Profiles":{
"3":{
"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":[
"PhatPhuckDave"
],
"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"
},
{
"Tertiale":"lalt & 4"
},
{
"Quartio":"lalt & 5"
}
],
"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":{}
},
"5":{
"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":[
"PhatPhuckDave"
],
"IABordercolor":[
"FFFFFF"
],
"TextColor":[
"FFFFFF"
]
}
},
"Hotkey Groups":{
"Daves":{
"AutoForwardOnKeypress":1,
"AutoForwardToggle":1,
"AutoForwardToggleHotkey":"SC029",
"BackwardsHotkey":"+Tab",
"Characters":[
"PhatPhuckDave",
"Primorium",
"Secundamen",
"Tertiale",
"Quartio",
"BastardSlavDave",
"Primuskov",
"Secundovich",
"Tertioslav",
"Quartinski"
],
"ForwardsHotkey":"Tab"
}
},
"Hotkeys":[
{
"PhatPhuckDave":"lalt & 1"
},
{
"Primorium":"lalt & 2"
},
{
"Secundamen":"lalt & 3"
},
{
"Tertiale":"lalt & 4"
},
{
"Quartio":"lalt & 5"
},
{
"BastardSlavDave":"lalt & 1"
},
{
"Primuskov":"lalt & 2"
},
{
"Secundovich":"lalt & 3"
},
{
"Tertioslav":"lalt & 4"
},
{
"Quartinski":"lalt & 5"
}
],
"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":{}
},
"Alternate":{
"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":[
"PhatPhuckDave"
],
"IABordercolor":[
"FFFFFF"
],
"TextColor":[
"FFFFFF"
]
}
},
"Hotkey Groups":{
"Daves":{
"AutoForwardOnKeypress":1,
"AutoForwardToggle":1,
"AutoForwardToggleHotkey":"SC029",
"BackwardsHotkey":"+Tab",
"Characters":[
"Tertiale",
"Quartio"
],
"ForwardsHotkey":"Tab"
}
},
"Hotkeys":[
{
"PhatPhuckDave":"lalt & 1"
},
{
"Primorium":"lalt & 2"
},
{
"Secundamen":"lalt & 3"
},
{
"Tertiale":"lalt & 4"
},
{
"Quartio":"lalt & 5"
}
],
"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":{
"AddCharacterToGroupHotkey":"^Y",
"AutoForwardDelay":0,
"CharScreenHotkey":"",
"CharacterNameOverlayHotkeyColor":"AAAAAA",
"CharacterNameOverlayHotkeySize":14,
"CharacterNameOverlayPosition":{
"x":1097,
"y":0
},
"CharacterNameOverlayTextBold":1,
"CharacterNameOverlayTextColor":"FFFFFF",
"CharacterNameOverlayTextSize":24,
"DisableLiveThumbnail":1,
"Exclude_Character_Hotkey":"",
"Global_Hotkeys":1,
"LastUsedProfile":"5",
"Minimize_Delay":100,
"Reload_Script_Hotkey":"+SC029",
"Suspend_Hotkeys_Hotkey":"!SC029",
"ThumbnailBackgroundColor":"#57504E",
"ThumbnailMinimumSize":{
"height":50,
"width":50
},
"ThumbnailSnap":1,
"ThumbnailSnap_Distance":"20",
"ThumbnailStartLocation":{
"height":140,
"width":250,
"x":20,
"y":20
}
}
}

View File

@@ -2,7 +2,10 @@
(
{
"global_Settings": {
"CharScreenHotkey":"",
"DisableLiveThumbnail": 0,
"Suspend_Hotkeys_Hotkey": "",
"Reload_Script_Hotkey": "",
"Global_Hotkeys": 1,
"LastUsedProfile": "Default",
"Minimize_Delay": 100,
@@ -18,7 +21,18 @@
"ThumbnailMinimumSize": {
"width": 50,
"height": 50
}
},
"CharacterNameOverlayPosition": {
"x": 0,
"y": 20
},
"CharacterNameOverlayTextSize": 24,
"CharacterNameOverlayTextColor": "FFFFFF",
"CharacterNameOverlayTextBold": true,
"CharacterNameOverlayHotkeySize": 14,
"CharacterNameOverlayHotkeyColor": "AAAAAA",
"AutoForwardDelay": 0,
"AddCharacterToGroupHotkey": ""
},
"_Profiles": {
"Default": {

View File

@@ -26,7 +26,7 @@ A_MaxHotKeysPerInterval := 10000
TODO #########################
*/
;@Ahk2Exe-Let U_version = 1.0.4.
;@Ahk2Exe-Let U_version = 1.0.5.
;@Ahk2Exe-SetVersion %U_version%
;@Ahk2Exe-SetFileVersion %U_version%
;@Ahk2Exe-SetCopyright gonzo83
@@ -45,11 +45,17 @@ if !(A_IsCompiled)
TraySetIcon("icon.ico",,true)
; Catch all unhandled Errors to prevent the Script from stopping
OnError(Error_Handler)
;OnError(Error_Handler)
Call := Main_Class()
#HotIf WinActive("ahk_exe exefile.exe")
WheelUp::Send("{Numpad4}")
WheelDown::Send("{Numpad6}")
+WheelUp::Send("{WheelUp}")
+WheelDown::Send("{WheelDown}")
#HotIf
Load_JSON() {
DJSON := JSON.Load(default_JSON)
@@ -60,10 +66,6 @@ Load_JSON() {
}
else {
Try {
if (FileExist("EVE-X-Preview.json")) {
;if needed because of Backward combativity from the alpha versions
MergeJson()
}
_JSON := JsonMergeNoOverwrite(
DJSON,
JSON.Load(FileRead("EVE-X-Preview.json"))
@@ -97,57 +99,6 @@ JsonMergeNoOverwrite(obj1, 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
Error_Handler(Thrown, Mode) {
return -1

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,25 @@ 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
AutoForwardTimer := 0 ; Timer reference for TriggerAutoForward
AutoForwardRunning := false ; Flag to prevent re-entrancy
AutoForwardTimerPending := false ; Flag to prevent multiple timers from being scheduled
CharacterNameOverlay := 0 ; GUI overlay for displaying current character name
CharacterNameOverlayLastText := "" ; Track last displayed text to prevent flashing
CharacterNameOverlayLastColor := "" ; Track last color to detect changes
LastActiveCharacter := "" ; Track last active character for AddCharacterToGroup
CharacterNameOverlayX := 0 ; Stored X position for dragging
CharacterNameOverlayY := 0 ; Stored Y position for dragging
CharacterNameOverlayDragging := false ; Flag for drag state
CharacterNameOverlayOffsetX := 0 ; Drag offset X
CharacterNameOverlayOffsetY := 0 ; Drag offset Y
CharacterGroupPositions := Map() ; Track last known positions: groupName -> characterName -> index
__New() {
@@ -66,8 +83,31 @@ Class Main_Class extends ThumbWindow {
}
}
; 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" )
}
}
; Register Hotkey for Add Character to Group if the user has it Set
if (This.AddCharacterToGroupHotkey != "") {
HotIf (*) => WinActive(This.EVEExe)
try {
Hotkey This.AddCharacterToGroupHotkey, ( * ) => This.AddCharacterToGroup(), "S1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in: Global Settings -> Add Character to Group-Hotkey" )
}
}
; The Timer property for Asycn Minimizing.
this.timer := ObjBindMethod(this, "EVEMinimize")
This.Register_CharSelectionScreen_Hotkeys()
;margins for DwmExtendFrameIntoClientArea. higher values extends the shadow
This.margins := Buffer(16, 0)
@@ -82,6 +122,7 @@ Class Main_Class extends ThumbWindow {
;The Main Timer who checks for new EVE Windows or closes Windows
SetTimer(ObjBindMethod(This, "HandleMainTimer"), 50)
SetTimer(ObjBindMethod(This, "UpdateCharacterNameOverlay"), 100)
This.Save_Settings_Delay_Timer := ObjBindMethod(This, "SaveJsonToFile")
;Timer property to remove Thumbnails for closed EVE windows
This.DestroyThumbnails := ObjBindMethod(This, "EvEWindowDestroy")
@@ -90,9 +131,169 @@ Class Main_Class extends ThumbWindow {
;Register the Hotkeys for cycle groups
This.Register_Hotkey_Groups()
This.BorderActive := 0
This.ClientsInCharScreen := Map()
; Create character name overlay
This.CreateCharacterNameOverlay()
return This
}
CreateCharacterNameOverlay() {
This.CharacterNameOverlay := Gui("+LastFound -Caption +ToolWindow AlwaysOnTop -SysMenu", "CharacterNameOverlay")
This.CharacterNameOverlay.BackColor := "040101"
This.CharacterNameOverlay.MarginX := 20
This.CharacterNameOverlay.MarginY := 10
textWeight := This.CharacterNameOverlayTextBold ? "w700" : "w400"
This.CharacterNameOverlay.SetFont("s" This.CharacterNameOverlayTextSize " " textWeight " c" This.CharacterNameOverlayTextColor, "Arial")
nameCtrl := This.CharacterNameOverlay.Add("Text", "vCharacterNameText", "")
nameCtrl.Opt("+Background040101")
nameCtrl.OnEvent("Click", ObjBindMethod(This, "CharacterNameOverlay_Drag"))
This.CharacterNameOverlay.SetFont("s" This.CharacterNameOverlayHotkeySize " w400 c" This.CharacterNameOverlayHotkeyColor, "Arial")
hotkeyCtrl := This.CharacterNameOverlay.Add("Text", "vCharacterHotkeyText x+0 w100", "")
hotkeyCtrl.Opt("+Background040101")
hotkeyCtrl.OnEvent("Click", ObjBindMethod(This, "CharacterNameOverlay_Drag"))
This.CharacterNameOverlay.SetFont("s14 w400 c" This.CharacterNameOverlayTextColor, "Arial")
autoCycleCtrl := This.CharacterNameOverlay.Add("Text", "vAutoCycleIndicator w30", "")
autoCycleCtrl.Opt("+Background040101")
autoCycleCtrl.OnEvent("Click", ObjBindMethod(This, "CharacterNameOverlay_Drag"))
WinSetTransColor("040101", This.CharacterNameOverlay.Hwnd)
This.CharacterNameOverlayX := This.CharacterNameOverlayPosition["x"] ? This.CharacterNameOverlayPosition["x"] : A_ScreenWidth - 340
This.CharacterNameOverlayY := This.CharacterNameOverlayPosition["y"] ? This.CharacterNameOverlayPosition["y"] : 20
SetTimer(ObjBindMethod(This, "CharacterNameOverlay_CheckDrag"), 10)
}
UpdateCharacterNameOverlay() {
if (!This.CharacterNameOverlay)
return
try {
if (WinActive(This.EVEExe)) {
activeTitle := This.CleanTitle(WinGetTitle("A"))
if (activeTitle != "" && activeTitle != This.CharacterNameOverlayLastText) {
if (This.CharacterNameOverlayLastText != "")
This.LastActiveCharacter := This.CharacterNameOverlayLastText
This.CharacterNameOverlayLastText := activeTitle
This.CharacterNameOverlay["CharacterNameText"].Text := activeTitle
}
if (activeTitle != "") {
inGroup := This.IsCharacterInGroup(activeTitle)
isSuspended := A_IsSuspended
baseColor := This.CharacterNameOverlayTextColor
if (isSuspended) {
textColor := This.TintColorRed(baseColor)
} else {
textColor := inGroup ? This.TintColor(baseColor, 0.15) : baseColor
}
if (textColor != This.CharacterNameOverlayLastColor || activeTitle != This.CharacterNameOverlayLastText) {
textWeight := This.CharacterNameOverlayTextBold ? "w700" : "w400"
This.CharacterNameOverlay.SetFont("s" This.CharacterNameOverlayTextSize " " textWeight " c" textColor, "Arial")
This.CharacterNameOverlay["CharacterNameText"].SetFont("s" This.CharacterNameOverlayTextSize " " textWeight " c" textColor, "Arial")
This.CharacterNameOverlayLastColor := textColor
}
}
hotkeyText := ""
hotkeyValue := This._Hotkeys[activeTitle]
if (hotkeyValue && hotkeyValue != "" && hotkeyValue != 0) {
hotkeyText := hotkeyValue
}
This.CharacterNameOverlay["CharacterHotkeyText"].Text := hotkeyText
autoCycleActive := false
for groupIdx, Arr in This.AutoForwardGroups {
if (This.AutoForwardEnabled[groupIdx]) {
autoCycleActive := true
break
}
}
This.CharacterNameOverlay["AutoCycleIndicator"].Text := autoCycleActive ? "" : ""
nameWidth := 20 + (StrLen(activeTitle) * (This.CharacterNameOverlayTextSize * 0.7))
if (nameWidth < 150)
nameWidth := 150
This.CharacterNameOverlay["CharacterNameText"].Move(, , nameWidth)
ControlGetPos(&nameX, , &nameW, , This.CharacterNameOverlay["CharacterNameText"])
This.CharacterNameOverlay["CharacterHotkeyText"].Move(nameX + nameW, , , )
ControlGetPos(&hotkeyX, &hotkeyY, &hotkeyW, &hotkeyH, This.CharacterNameOverlay["CharacterHotkeyText"])
ControlGetPos(, , , &nameH, This.CharacterNameOverlay["CharacterNameText"])
This.CharacterNameOverlay["AutoCycleIndicator"].Move(hotkeyX, hotkeyY + hotkeyH, , )
This.CharacterNameOverlay.Show("AutoSize NoActivate")
if (This.CharacterNameOverlayX = 0)
This.CharacterNameOverlayX := A_ScreenWidth - 340
WinMove(This.CharacterNameOverlayX, This.CharacterNameOverlayY, , , This.CharacterNameOverlay.Hwnd)
if (!GetKeyState("LButton", "P"))
WinSetExStyle("+0x20", This.CharacterNameOverlay.Hwnd)
} else if (This.CharacterNameOverlayLastText != "") {
This.CharacterNameOverlayLastText := ""
This.CharacterNameOverlay.Show("Hide")
}
} catch {
}
}
CharacterNameOverlay_CheckDrag() {
if (!This.CharacterNameOverlay)
return
if (!WinExist("ahk_id " This.CharacterNameOverlay.Hwnd))
return
MouseGetPos(&mx, &my)
WinGetPos(&wx, &wy, &ww, &wh, This.CharacterNameOverlay.Hwnd)
if (mx >= wx && mx <= wx + ww && my >= wy && my <= wy + wh) {
if (GetKeyState("RButton", "P")) {
WinSetExStyle("-0x20", This.CharacterNameOverlay.Hwnd)
if (!This.CharacterNameOverlayDragging) {
This.CharacterNameOverlayDragging := true
CoordMode("Mouse", "Screen")
MouseGetPos(&startX, &startY)
WinGetPos(&winX, &winY, , , This.CharacterNameOverlay.Hwnd)
This.CharacterNameOverlayOffsetX := startX - winX
This.CharacterNameOverlayOffsetY := startY - winY
}
MouseGetPos(&currentX, &currentY)
newX := currentX - This.CharacterNameOverlayOffsetX
newY := currentY - This.CharacterNameOverlayOffsetY
if (newX < 0)
newX := 0
if (newY < 0)
newY := 0
if (newX + 340 > A_ScreenWidth)
newX := A_ScreenWidth - 340
WinMove(newX, newY, , , This.CharacterNameOverlay.Hwnd)
This.CharacterNameOverlayX := newX
This.CharacterNameOverlayY := newY
This.CharacterNameOverlayPosition["x"] := newX
This.CharacterNameOverlayPosition["y"] := newY
SetTimer(This.Save_Settings_Delay_Timer, -200)
} else {
if (This.CharacterNameOverlayDragging) {
This.CharacterNameOverlayDragging := false
WinSetExStyle("+0x20", This.CharacterNameOverlay.Hwnd)
}
}
} else {
if (This.CharacterNameOverlayDragging && !GetKeyState("LButton", "P")) {
This.CharacterNameOverlayDragging := false
WinSetExStyle("+0x20", This.CharacterNameOverlay.Hwnd)
}
}
}
CharacterNameOverlay_Drag(*) {
; Handler for click events - but we use timer-based dragging instead
}
HandleMainTimer() {
static HideShowToggle := 0, WinList := {}
@@ -102,26 +303,42 @@ Class Main_Class extends ThumbWindow {
return
; If any EVE Window exist
if (WinList.Length) {
try {
;Check if a window exist without Thumbnail and if the user is in Character selection screen or not
for index, hwnd in WinList {
WinList.%hwnd% := { Title: This.CleanTitle(WinGetTitle(hwnd)) }
if !This.ThumbWindows.HasProp(hwnd) {
This.EVE_WIN_Created(hwnd, WinList.%hwnd%.title)
if (!This.HideThumbnailsOnLostFocus)
This.ShowThumb(hwnd, "Show")
HideShowToggle := 1
}
;if in Character selection screen
else if (This.ThumbWindows.HasProp(hwnd)) {
if (This.ThumbWindows.%hwnd%["Window"].Title != WinList.%hwnd%.Title) {
This.EVENameChange(hwnd, WinList.%hwnd%.Title)
}
}
;Check if a window exist without Thumbnail and if the user is in Character selection screen or not
for index, hwnd in WinList {
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) {
This.EVE_WIN_Created(hwnd, WinList.%hwnd%.title)
if (!This.HideThumbnailsOnLostFocus)
This.ShowThumb(hwnd, "Show")
HideShowToggle := 1
}
;if in Character selection screen
else if (This.ThumbWindows.HasProp(hwnd)) {
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)
}
}
else if (This.ThumbWindows.%hwnd%["Window"].Title != WinList.%hwnd%.Title) {
This.EVENameChange(hwnd, WinList.%hwnd%.Title)
}
}
}
catch
return
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
@@ -130,6 +347,7 @@ Class Main_Class extends ThumbWindow {
if ((DllCall("IsIconic","UInt", WinActive("ahk_exe exefile.exe")) || ActiveProcessName != "exefile.exe") && !HideShowToggle && This.HideThumbnailsOnLostFocus) {
SetTimer(This.CheckforActiveWindow, -500)
HideShowToggle := 1
This.UpdateCharacterNameOverlay()
}
else if ( ActiveProcessName = "exefile.exe" && !DllCall("IsIconic","UInt", WinActive("ahk_exe exefile.exe"))) {
Ahwnd := WinExist("A")
@@ -149,7 +367,6 @@ Class Main_Class extends ThumbWindow {
This.ShowActiveBorder(Ahwnd)
This.UpdateThumb_AfterActivation(, Ahwnd)
This.BorderActive := Ahwnd
}
}
}
@@ -189,12 +406,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")
try {
Hotkey This._Hotkeys[title], (*) => This.ActivateEVEWindow(,,title), "P1"
Hotkey hk, (*) => This.ActivateEVEWindow_WithModifierCheck(,,title, hk), "P1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
@@ -203,70 +421,333 @@ 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)
try {
Hotkey This._Hotkeys[title], (*) => This.ActivateEVEWindow(,,title),"P1"
Hotkey hk, (*) => This.ActivateEVEWindow_WithModifierCheck(,,title, hk),"P1"
}
catch ValueError as e {
MsgBox(e.Message ": --> " e.Extra " <-- in Profile Settings - " This.LastUsedProfile " Hotkeys" )
}
}
}
}
; Wrapper that checks for extra modifiers before activating window
ActivateEVEWindow_WithModifierCheck(hwnd?, ThisHotkey?, title?, hk?) {
if (IsSet(hk) && This.HasExtraModifiers(hk))
return
This.ActivateEVEWindow(hwnd?, ThisHotkey?, title?)
}
; 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_Hotkey_Groups() {
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" )
}
}
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" )
}
}
}
}
}
}
; 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] := []
try {
currentHwnd := WinGetID("A")
This.AutoForwardProcessedWindow := currentHwnd
}
This.AutoForwardTimerPending := false ; Reset timer pending flag
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
if (nCode < 0 || (wParam != WM_LBUTTONUP && wParam != WM_RBUTTONUP && wParam != WM_MBUTTONUP))
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
if (!This.IsAutoForwardActive())
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
try {
if (This.AutoForwardRunning || This.AutoForwardTimerPending)
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
This.AutoForwardTimerPending := true
This.AutoForwardTimer := ObjBindMethod(This, "TriggerAutoForward")
SetTimer(This.AutoForwardTimer, -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())
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
try {
if (This.AutoForwardRunning || This.AutoForwardTimerPending)
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam)
This.AutoForwardTimerPending := true
This.AutoForwardTimer := ObjBindMethod(This, "TriggerAutoForward")
SetTimer(This.AutoForwardTimer, -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() {
if (This.AutoForwardRunning)
return
This.AutoForwardRunning := true
This.AutoForwardTimerPending := false
This.AutoForwardTimer := 0
if (This.AutoForwardDelay > 0)
Sleep(This.AutoForwardDelay)
try {
ActiveTitle := This.CleanTitle(WinGetTitle("A"))
for groupIdx, Arr in This.AutoForwardGroups {
if (!This.AutoForwardEnabled[groupIdx] || !This.OnWinActive(Arr))
continue
for index, name in Arr {
if (name != ActiveTitle)
continue
This.Cycle_Hotkey_Groups(Arr, "ForwardsHotkey")
try {
newWindow := WinGetID("A")
This.AutoForwardProcessedWindow := newWindow
} catch {
This.AutoForwardRunning := false
return
}
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 (!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] := []
}
}
This.AutoForwardRunning := false
return
}
}
}
finally {
This.AutoForwardRunning := false
}
}
; The method to make it possible to cycle throw the EVE Windows. Used with the Hotkey Groups
@@ -290,7 +771,7 @@ Class Main_Class extends ThumbWindow {
Index := 1
}
}
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]))
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]), true)
}
}
}
@@ -309,7 +790,7 @@ Class Main_Class extends ThumbWindow {
Index := length
}
}
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]))
This.ActivateEVEWindow(,,This.CleanTitle(Arr[Index]), true)
}
}
@@ -321,6 +802,18 @@ Class Main_Class extends ThumbWindow {
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
OnWinExist(Arr, *) {
@@ -469,7 +962,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()
@@ -479,20 +972,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])
@@ -551,7 +1053,7 @@ Class Main_Class extends ThumbWindow {
; gets called by the timer to run async
EVEMinimize() {
for EveHwnd, GuiObj in This.ThumbWindows.OwnProps() {
ThumbHwnd := GuiObj["Window"].Hwnd
;ThumbHwnd := GuiObj["Window"].Hwnd
try
WinTitle := WinGetTitle("Ahk_Id " EveHwnd)
catch
@@ -729,9 +1231,142 @@ Class Main_Class extends ThumbWindow {
}
AddCharacterToGroup(*) {
if (!WinActive(This.EVEExe))
return
currentTitle := This.CleanTitle(WinGetTitle("A"))
if (currentTitle = "")
return
targetGroupName := ""
if (IsObject(This.Hotkey_Groups) && This.Hotkey_Groups.Count != 0) {
for groupName, groupData in This.Hotkey_Groups {
if (IsObject(groupData["Characters"])) {
for index, charName in groupData["Characters"] {
if (charName = currentTitle) {
targetGroupName := groupName
break
}
}
if (targetGroupName != "")
break
}
}
}
if (targetGroupName = "") {
if (IsObject(This.Hotkey_Groups) && This.Hotkey_Groups.Count != 0) {
for groupName, groupData in This.Hotkey_Groups {
if (IsObject(groupData["Characters"]) && groupData["Characters"].Length > 0) {
targetGroupName := groupName
break
}
}
}
}
if (targetGroupName = "")
return
if (!IsObject(This.Hotkey_Groups[targetGroupName]["Characters"]))
This.Hotkey_Groups[targetGroupName]["Characters"] := []
if (!This.CharacterGroupPositions.Has(targetGroupName))
This.CharacterGroupPositions[targetGroupName] := Map()
alreadyInGroup := false
removeIndex := 0
for index, charName in This.Hotkey_Groups[targetGroupName]["Characters"] {
if (charName = currentTitle) {
alreadyInGroup := true
removeIndex := index
break
}
}
if (!alreadyInGroup) {
previousIndex := This.CharacterGroupPositions[targetGroupName].Has(currentTitle) ? This.CharacterGroupPositions[targetGroupName][currentTitle] : -1
currentLength := This.Hotkey_Groups[targetGroupName]["Characters"].Length
if (previousIndex >= 1 && previousIndex <= currentLength) {
This.Hotkey_Groups[targetGroupName]["Characters"].InsertAt(previousIndex, currentTitle)
} else {
This.Hotkey_Groups[targetGroupName]["Characters"].Push(currentTitle)
previousIndex := This.Hotkey_Groups[targetGroupName]["Characters"].Length
}
This.CharacterGroupPositions[targetGroupName][currentTitle] := previousIndex
ToolTip("Added " currentTitle " to group")
SetTimer(() => ToolTip(), -1500)
This.UpdateCharacterNameOverlay()
} else {
This.CharacterGroupPositions[targetGroupName][currentTitle] := removeIndex
This.Hotkey_Groups[targetGroupName]["Characters"].RemoveAt(removeIndex)
ToolTip("Removed " currentTitle " from group")
SetTimer(() => ToolTip(), -1500)
This.UpdateCharacterNameOverlay()
}
}
IsCharacterInGroup(charName) {
if (!IsObject(This.Hotkey_Groups) || This.Hotkey_Groups.Count = 0)
return false
for groupName, groupData in This.Hotkey_Groups {
if (IsObject(groupData["Characters"])) {
for index, name in groupData["Characters"] {
if (name = charName)
return true
}
}
}
return false
}
TintColor(hexColor, tintAmount := 0.2) {
hexColor := RegExReplace(hexColor, "^#|^0x", "")
if (StrLen(hexColor) != 6)
return hexColor
r := Integer("0x" SubStr(hexColor, 1, 2))
g := Integer("0x" SubStr(hexColor, 3, 2))
b := Integer("0x" SubStr(hexColor, 5, 2))
r := Round(r + (255 - r) * tintAmount)
g := Round(g + (255 - g) * tintAmount)
b := Round(b + (255 - b) * tintAmount)
r := (r > 255 ? 255 : r < 0 ? 0 : r)
g := (g > 255 ? 255 : g < 0 ? 0 : g)
b := (b > 255 ? 255 : b < 0 ? 0 : b)
return Format("{:02X}{:02X}{:02X}", r, g, b)
}
TintColorRed(hexColor) {
hexColor := RegExReplace(hexColor, "^#|^0x", "")
if (StrLen(hexColor) != 6)
return hexColor
r := Integer("0x" SubStr(hexColor, 1, 2))
g := Integer("0x" SubStr(hexColor, 3, 2))
b := Integer("0x" SubStr(hexColor, 5, 2))
r := Round(r + (255 - r))
g := Round(g - g)
b := Round(b - b)
r := (r > 255 ? 255 : r < 0 ? 0 : r)
g := (g > 255 ? 255 : g < 0 ? 0 : g)
b := (b > 255 ? 255 : b < 0 ? 0 : b)
return Format("{:02X}{:02X}{:02X}", r, g, b)
}
SaveJsonToFile() {
FileDelete("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
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] {
get => This._JSON["global_Settings"]["ThumbnailStartLocation"][key]
set => This._JSON["global_Settings"]["ThumbnailStartLocation"][key] := value
}
Minimizeclients_Delay {
@@ -50,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)
@@ -76,6 +89,46 @@ class Propertys extends TrayMenu {
set => This._JSON["global_Settings"]["ThumbnailMinimumSize"][key] := value
}
CharacterNameOverlayPosition[key] {
get => This._JSON["global_Settings"]["CharacterNameOverlayPosition"][key]
set => This._JSON["global_Settings"]["CharacterNameOverlayPosition"][key] := value
}
CharacterNameOverlayTextSize {
get => This._JSON["global_Settings"]["CharacterNameOverlayTextSize"]
set => This._JSON["global_Settings"]["CharacterNameOverlayTextSize"] := value
}
CharacterNameOverlayTextColor {
get => This._JSON["global_Settings"]["CharacterNameOverlayTextColor"]
set => This._JSON["global_Settings"]["CharacterNameOverlayTextColor"] := value
}
CharacterNameOverlayTextBold {
get => This._JSON["global_Settings"]["CharacterNameOverlayTextBold"]
set => This._JSON["global_Settings"]["CharacterNameOverlayTextBold"] := value
}
CharacterNameOverlayHotkeySize {
get => This._JSON["global_Settings"]["CharacterNameOverlayHotkeySize"]
set => This._JSON["global_Settings"]["CharacterNameOverlayHotkeySize"] := value
}
CharacterNameOverlayHotkeyColor {
get => This._JSON["global_Settings"]["CharacterNameOverlayHotkeyColor"]
set => This._JSON["global_Settings"]["CharacterNameOverlayHotkeyColor"] := value
}
AutoForwardDelay {
get => This._JSON["global_Settings"]["AutoForwardDelay"]
set => This._JSON["global_Settings"]["AutoForwardDelay"] := value
}
AddCharacterToGroupHotkey {
get => This._JSON["global_Settings"]["AddCharacterToGroupHotkey"]
set => This._JSON["global_Settings"]["AddCharacterToGroupHotkey"] := value
}
;########################
;## Profile ThumbnailSettings
@@ -407,7 +460,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?] {
@@ -522,6 +575,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")

View File

@@ -108,8 +108,10 @@
Global_Settings(visible?) {
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 h280 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("GroupBox", "x20 y80 h360 w500")
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+20", "Add Character to Group - 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:")
This.S_Gui.Controls.Global_Settings.Push This.S_Gui.Add("Text", "xs y+15", "Thumbnail Default Location:")
@@ -117,9 +119,15 @@
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", "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["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("Edit", "xp y+10 w150 Section vAddCharacterToGroupHotkey", This.AddCharacterToGroupHotkey)
This.S_Gui["AddCharacterToGroupHotkey"].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["Hotkey_Scoope"].OnEvent("Change", (obj, *) => gSettings_EventHandler(obj))
@@ -164,9 +172,12 @@
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.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) {
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") {
@@ -208,6 +219,18 @@
This.Minimizeclients_Delay := obj.value
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
}
else if (obj.name = "AddCharacterToGroupHotkey") {
This.AddCharacterToGroupHotkey := obj.value
This.NeedRestart := 1
}
SetTimer(This.Save_Settings_Delay_Timer, -200)
}
}
@@ -396,6 +419,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
@@ -417,6 +454,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)
@@ -430,6 +470,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)
@@ -444,6 +487,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
}
}
@@ -464,9 +513,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)
}
}
}
@@ -743,7 +811,9 @@
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["CharScreenHotkey"].value := This.CharScreenHotkey
This.S_Gui["AddCharacterToGroupHotkey"].value := This.AddCharacterToGroupHotkey
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"]

View File

@@ -87,5 +87,6 @@ Class TrayMenu extends Settings_Gui {
Sleep(50)
}
}
ExitApp()
}
}