AutoHotkey: Tray Icon for TC: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
m (Tooltip text)
(Added category AutoHotkey scripts)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  ; Start Total Commander with a tray icon.
  ; Start Total Commander with a tray icon.
  ; It allows the user to Show/Hide TC by double clicking on it.
  ; It allows the user to Show/Hide TC by clicking on it.
  ; The script allows more instances of TC running, each having its own tray icon.
  ; The script allows more instances of TC running, each having its own tray icon.
   
   
Line 45: Line 45:




Back to [[AutoHotkey]]
{{translated|AutoHotkey: Systemtrayicon für den TC|AutoHotkey}}
[[Category:AutoHotkey scripts|Tray Icon for TC]]

Latest revision as of 00:04, 1 June 2008

; Start Total Commander with a tray icon.
; It allows the user to Show/Hide TC by clicking on it.
; The script allows more instances of TC running, each having its own tray icon.

DetectHiddenWindows On

Menu Tray, Icon, %COMMANDER_PATH%\TOTALCMD.EXE
Menu Tray, NoStandard
Menu Tray, Add, Hide, subShowHide
Menu Tray, Default, Hide
Menu Tray, Add
Menu Tray, Add, Exit, subExit
Menu Tray, Click, ClickCount 1
Menu Tray, Tip, Total Commander

OnExit subExit

bHidden := False

RunWait %COMMANDER_PATH%\TOTALCMD.EXE,,,pidTC
Return

subShowHide:
	if (bHidden)
	{
		WinActivate ahk_pid %pidTC%
		WinShow ahk_pid %pidTC%
		Menu Tray, Rename, Show, Hide
		Menu Tray, Default, Hide
		bHidden := False
	}
	else
	{
		WinHide ahk_pid %pidTC%
		Menu Tray, Rename, Hide, Show
		Menu Tray, Default, Show
		bHidden := True
	}
	Return

subExit:
	WinClose ahk_pid %pidTC%
	ExitApp



Back to AutoHotkey