; assign this script to a hotkey for a 1+2 cycle button:
; if app not running then start it
; else cycle: hide/show window (or minimize/restore it)
; substitute "TheCaption" and "TheApp" as suitable and
; uncomment desired behavior
local caption
caption="TheCaption"
If ( 0 == anywindow(caption) ) Do
"%ProgramFiles%\TheApp.exe"
Else
; use this to cycle between hiding and showing the window
; *Window HideShow! &(caption)
; use this to cycle between minimizing to taskbar and restoring the window
; *Window MinRestore &(caption)
; use this to cycle between minimizing to tray and restoring the window
If(VisibleWindow(caption)) Do
*Window TrayMin! &(caption)
Else
*Window Show! &(caption)
EndIf
Endif
|