Passing search value to external editor.

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
kluvi
Junior Member
Junior Member
Posts: 45
Joined: 2010-02-18, 11:13 UTC
Location: Czech rep.

Passing search value to external editor.

Post by *kluvi »

I am not sure if I'm overlooked something , but i have this problem:
I use PSPAD to view files with source code of Delphi (*.PAS)
when i let TC search for some string in directories, TC returns list of files.
When i press F3 TC shows file in internal viewer and i can continue with serach in choosen file.
But if i use external editor, TC is not passing search string to it, i must enter search string in external editor again.

I think that there is no possibility to manage it, but it's worth it to ask...
PSPAD accepts this command line: /F "searchstring" (or /FR for regexp) but i dont know if it is possible to pass it FROM TC..
With regards
Martin
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50865
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Passing search value to external editor.

Post by *ghisler(Author) »

Sorry, there is currently no way to pass a search string to an external editor from TC. It's not even possible via a button because there is no placeholder for the last search string.
Author of Total Commander
https://www.ghisler.com
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Re: Passing search value to external editor.

Post by *Gral »

AutoHotKey, something like this:

Code: Select all

IniRead, OutputVar, %COMMANDER_INI%, SearchText, 0
Run, PSPad.exe /F "%OutputVar%" %1%
User avatar
Usher
Power Member
Power Member
Posts: 1727
Joined: 2011-03-11, 10:11 UTC

Re: Passing search value to external editor.

Post by *Usher »

2ghisler(Author)
It would be great to pass a search string to a Lister plugin. Let the plugin developer decide whether it's possible to pass this string to external viewers/editors.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
kluvi
Junior Member
Junior Member
Posts: 45
Joined: 2010-02-18, 11:13 UTC
Location: Czech rep.

Re: Passing search value to external editor.

Post by *kluvi »

2 usher: so TC should call Lister and (modified) lister open some external editor (with searchstring as param)?
I quess that nobody will be willing to do that. :)
But let's try.. I guess that internal lister author is .....Christian, the boss ..??

Autohotkey: Oh, so big gun for such small bug ;-)

2 Christian: placeholder- i dont understand what does it mean exactly ..but i guess. An why Lister plugin is able to get that searchstring? Because of some TC API?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Passing search value to external editor.

Post by *Horst.Epp »

Using Grals Autohotkey solution you can feed the TC search results to the listbox
and use a button to start the script with one of the search results.
Its nonsense to say Autohotkey is a big gun if only 2 lines are needed.
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
Post Reply