Use text from "Find File" dialog in external viewe

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
grim
Junior Member
Junior Member
Posts: 8
Joined: 2012-02-23, 07:32 UTC

Use text from "Find File" dialog in external viewe

Post by *grim »

Pre:
- Options: Set "Viewer for F3" to "External viewer" (e.g. Universal Viewer)

1. Open "Find Files" dialog
2. Search for text inside the files, i.e. check "Find Text" and enter some text to appropriate textbox (e.g. "TextToSearch").
3. start search
4. once the search finishes, push "Feed to listbox" button
5. push F3 to open one of the files found and push F3 again to start "Find next" in opened file.
6. external viewer (Universal Viewer) does NOT search for "TextToSearch" (but internal Lister would).

It is obvious every external viewer uses different cmd-line parameter to specify search string (or it doesn't support it at all), but I guess the parameter could be manually specified in config-file of TC. e.g.:
Viewer=<path>\universal_viewer\Viewer.exe
ViewerExternalSearchCommand=/FText=%s
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3896
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Well, you cannot force an external to use your "TextToSearch".
The external viewer has to catch the text by its own.

You may use SynWrite as viewer, which already works that way.
#5767 Personal license
grim
Junior Member
Junior Member
Posts: 8
Joined: 2012-02-23, 07:32 UTC

Post by *grim »

why not?

I guess that selected file is passed to external viewer as one (the only?) parameter using one of winapi functions, e.g. ShellExecute, so you can add one more argument that specifies search command,e.g (pseudocode):

string executable = $VIEWER
string parameters = $SELECTED_FILE + " " + $VIEWER_EXTERNAL_SEARCH_COMMAND + "=" + $TEXT_TO_SEARCH

ShellExecute(xxx, executable, parameters, ...)

am i totally wrong?
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

I support, supp. of this parameter needed.
Post Reply