Fix for switch clients over Traymenu
This commit is contained in:
@@ -599,22 +599,17 @@ class Propertys extends TrayMenu {
|
||||
|
||||
;### Stores the Thumbnail Size and Possitions in the Json file
|
||||
Save_Settings() {
|
||||
if !(This.Tray_Profile_scwitch) {
|
||||
for EvEHwnd, GuiObj in This.ThumbWindows.OwnProps() {
|
||||
for Names, Obj in GuiObj {
|
||||
if (Names = "Window" && Obj.Title = "" || Obj.Title = "EVE")
|
||||
continue
|
||||
Else if (Names = "Window") {
|
||||
WinGetPos(&wX, &wY, &wWidth, &wHeight, Obj.Hwnd)
|
||||
This.ThumbnailPositions[Obj.Title] := [wX, wY, wWidth, wHeight]
|
||||
}
|
||||
for EvEHwnd, GuiObj in This.ThumbWindows.OwnProps() {
|
||||
for Names, Obj in GuiObj {
|
||||
if (Names = "Window" && Obj.Title = "" || Obj.Title = "EVE")
|
||||
continue
|
||||
Else if (Names = "Window") {
|
||||
WinGetPos(&wX, &wY, &wWidth, &wHeight, Obj.Hwnd)
|
||||
This.ThumbnailPositions[Obj.Title] := [wX, wY, wWidth, wHeight]
|
||||
}
|
||||
}
|
||||
}
|
||||
SetTimer(This.Save_Settings_Delay_Timer, -200)
|
||||
; var := Json.Dump(This._JSON, , " ")
|
||||
; FileDelete("EVE-X-Preview.json")
|
||||
; FileAppend(var, "EVE-X-Preview.json")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ Class TrayMenu extends Settings_Gui {
|
||||
Profiles_Submenu.Add(k, MenuHandler)
|
||||
}
|
||||
|
||||
;Profiles_Submenu.Add() ;*Seperator line
|
||||
|
||||
TrayMenu := This.TrayMenuObj
|
||||
TrayMenu.Delete() ; Delete the Default TrayMenu Items
|
||||
|
||||
@@ -40,17 +38,17 @@ Class TrayMenu extends Settings_Gui {
|
||||
TrayMenu.Add("Save Client Positions", (*) => This.Client_Possitions())
|
||||
TrayMenu.Add()
|
||||
TrayMenu.Add()
|
||||
TrayMenu.Add("Save Thumbnail Positions", MenuHandler) ; Creates a separator line.
|
||||
TrayMenu.Add("Save Thumbnail Positions", MenuHandler)
|
||||
TrayMenu.Add("Reload", (*) => Reload())
|
||||
TrayMenu.Add()
|
||||
TrayMenu.Add("Exit", (*) => ExitApp()) ; Creates a new menu item.
|
||||
TrayMenu.Add("Exit", (*) => ExitApp())
|
||||
TrayMenu.Default := "Open"
|
||||
|
||||
MenuHandler(ItemName, ItemPos, MyMenu) {
|
||||
If (ItemName = "Exit")
|
||||
ExitApp
|
||||
Else if (ItemName = "Save Thumbnail Positions") {
|
||||
;* Saved Thumbnail Positions only if the Saved button is used on the Traymenu
|
||||
; Saved Thumbnail Positions only if the Saved button is used on the Traymenu
|
||||
This.Save_ThumbnailPossitions
|
||||
}
|
||||
Else if (ItemName = "Restore Client Positions") {
|
||||
@@ -59,10 +57,10 @@ Class TrayMenu extends Settings_Gui {
|
||||
SetTimer(This.Save_Settings_Delay_Timer, -200)
|
||||
}
|
||||
Else if (This.Profiles.Has(ItemName)) {
|
||||
This.Tray_Profile_scwitch := 1
|
||||
; Change the lastUsedProfile to the Profile name, save it to Json file and reload the script with the new Settings
|
||||
This.LastUsedProfile := ItemName
|
||||
This.Save_Settings()
|
||||
This.Tray_Profile_scwitch := 0
|
||||
This.SaveJsonToFile()
|
||||
Sleep(500)
|
||||
Reload()
|
||||
}
|
||||
Else if (ItemName = "Open") {
|
||||
|
||||
Reference in New Issue
Block a user