Code: Select all
Activate the first found item after search is completed
http://www.uku.fi/~jmhuttun/files/snapshots/?M=D
Icfu
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
Activate the first found item after search is completed
SanskritFritz wrote:Thanks Icfu! Now we have to find a method to put the cursor onto the file found in Locate. Hmmm... not AutoHotkey again...
Is it a misunderstandig? However: I still don't know, how I can force TC to jump to a located file without the help of a scriptIcfu wrote:You can activate that already in Options:[...]Code: Select all
Activate the first found item after search is completed
Code: Select all
;====================================================================================================
;LocateAndJump.au3: Script for AutoIT3 (http://www.autoitscript.com/autoit3/)
;Settings for Locate32:
;Menu Settings, Dialog "Settings:", Tab "Keyboard Shortcuts":
; Shortcut: Key: CTRL + F
; Advanced: Advanced Settings: Type: Local
; Where pressed: Result list
; Action: Action: Advanced
; Action: SubAction: Execute Command
; Action: Command: C:\Programme\AutoIt3\AutoIt3.exe C:\Programme\TotalCmd\Tools\LocateAndJump.au3 "%d"
; (Locate32 seems not to decode environment variables like "%ProgramFiles%")
;Usage:
;Find a file wth Locate32, press CTRL+F to open the containing dir in TC and to jump to the located file
;====================================================================================================
$fullname = $CmdLine[1]
$fullname_tok = StringSplit($fullname, "")
$filename = $fullname_tok[$fullname_tok[0]]
$pathname = StringLeft($fullname, StringLen($fullname) - StringLen($filename) - 1)
Run(@ProgramFilesDir & "\TotalCmd\TotalCmd.exe /O /T /S /L=" & Chr(34) & $pathname & Chr(34), "")
;*** cm_ShowQuickSearch=2915;Show name search window
Sleep(250)
DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle("Total Commander"), "int", 1075, "int", 2915)
Send($filename, 1)
Send("{ESC}")
;Send("{SPACE}")
It is not the same goal (see video below).ICFU wrote: Concerning the above AHK script:
It's superfluous!
You can achieve the same goal under ...
No you right, scripts are still needed if we want to force TC to jump to a located file (with quicksearch).van Dusen wrote: Is it a misunderstandig? However: I still don't know, how I can force TC to jump to a located file without the help of a script Sad
This is the purpose of the AHK script I proposed a few posts aboveSanskritFritz wrote: I'm looking for a way to send a message to TC instructing it to select a particular file, that would be awesome.
Just fill the quicksearch box with content then (ControlSetText), this is reliable. I have used it in this script:My concern is, that sending keystrokes to an application is not too stable and error proof (just type a character in, or move the focus away). If there is an option, i try to avoid that.