All of them work as expected except for one.
I hope someone here can help me tweak it so it behaves like the others.
The hotkey that needs tweaking will Open the app if it hasn't been launched.
But it won't maximize it, if it has been minimized, nor the reverse.
I will post the code for the one that needs tweaking first, then code for a couple that work
perfectly.
Code: Select all
Launch_Media::
open := False
For each, file in ["Political", "Guelph3a-Phone-Gen"]
{
winTitle = Ecco - [D:\Computer\Software\Ecco\%file%.eco]
WinGet, state, MinMax, %winTitle%
If (state = "")
Continue
open := True
If (state = MINIMIZED := -1)
; WinRestore, %winTitle%
WinActivate, %winTitle%
Else WinMinimize, %winTitle%
}
If !open
Run, C:\Program Files\Utils\Ecco\EccoPro\eccoext.exe
Return
Code: Select all
Browser_Favorites:: ;show/minimize Total Commander (x64) 10.00 - Mark
IfWinNotExist, Total Commander (x64) 10.00 - Mark
{
Run, C:\Program Files\Utils\Totalcmd10\TOTALCMD64.EXE
return
}
else
{
WinGet,CurrentState,MinMax, Total Commander (x64) 10.00 - Mark
if (CurrentState = -1) ; The window is minimized
WinRestore, Total Commander (x64) 10.00 - Mark
else
WinMinimize, Total Commander (x64) 10.00 - Mark
}
Return
Code: Select all
Launch_Mail:: ;show/minimize The Bat!
IfWinNotExist, The Bat!
{
SoundSet 8
Run, C:\Program Files\The Bat!\thebat64.exe
return
}
else
{
SoundSet 8
WinGet,CurrentState,MinMax, The Bat!
if (CurrentState = -1) ; The window is minimized
;WinRestore, The Bat!
WinActivate, The Bat!
else
WinMinimize, The Bat!
}
Return