AutoHotkey: Locate in TC: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
No edit summary
 
m (Credits to gbo and icfu!)
Line 1: Line 1:
Pressing '''Ctrl-F''' in [http://locate32.webhop.org/ Locate] finds the selected file in TC.
Pressing '''Ctrl-F''' in [http://locate32.webhop.org/ Locate] finds the selected file in TC.
Original credits go to [http://ghisler.ch/board/viewtopic.php?p=76027#76027 gbo] and [http://ghisler.ch/board/viewtopic.php?p=76034#76034 icfu]


  ;Ctrl-F (Locate: finds selected file in TC)
  ;Ctrl-F (Locate: finds selected file in TC)

Revision as of 13:28, 1 February 2006

Pressing Ctrl-F in Locate finds the selected file in TC. Original credits go to gbo and icfu

;Ctrl-F (Locate: finds selected file in TC)
$^f::
	If not WinActive( "Locate", "Presets" )
	{
		Send ^f
		Return
	}

	sFileName := ""
	sPath := ""
	ControlGet, sActiveRow, List, Selected, SysListView321
	StringSplit aRowElements, sActiveRow, %A_Tab%
	sFileName := aRowElements1
	sPath := aRowElements2

	if (sFileName != "")
	{
		Run, "%COMMANDER_PATH%\Totalcmd.exe" /O /T "%sPath%"
		WinWaitActive, ahk_class TTOTAL_CMD

		PostMessage, 1075, 2915, , , A ;call quicksearch box
		WinWaitActive ahk_class TQUICKSEARCH
		ControlSetText TTabEdit1, %sFileName%
		ControlSend TTabEdit1, {Down}{Esc}
	}
	Return

Back to AutoHotkey