topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 3:51 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Launch by piping path of a file found by a plugin to another application?  (Read 4293 times)

alijan

  • Participant
  • Joined in 2008
  • *
  • Posts: 4
    • View Profile
    • Donate to Member
I was wondering if it was possible to call an application on the search result returned by the lite everything plugin. What I want:

gvim ev _vimrc

to launch vim on the first result returned in window by everything.

Is it possible to do such a thing?

I tried playing around with an alias but wasn't successful.

Thanks!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
If it's always the same file type you want to open with vim you could use ewemoa's Akete plugin.

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
    • View Profile
    • Donate to Member
I use this alias for a similar action (open file in notepad).

The way I use it is I do a normal search and then add +edit to the ond of the search string.

1000>>>Edit>->Edit $$1 in Notepad++ | C:\Program Files\Notepad++\notepad++.exe $$1 /ICON=icons\edit.ico

This is from the docs:

Using Alias Action Keywords
 Top  Previous  Next  
A new feature with FARR version 2 is the ability to specify alias names in your search string using the + prefix (just like keyword modifiers).

When an alias name is specified in this way, anywhere on the search string, it does not effect search, but it will cause the alias results to be displayed AFTER the result file is selected, with the selected file name as argument $$1 in the alias.

In this way, you can perform a normal file/folder search and then launch a specific alias command with that file/folder as an ARGUMENT.

For example, you could create an alias named +hexedit
whose result contents are:

C:\Program Files\HexEditors\HexEdit.exe "$$1"

Now you can type in your search:
+hexedit mydocsearch...

As you type mydocsearch words, FARR will let you search for files as normal.
After you choose the result, instead of launching the result file, you will be presented with
C:\Program Files\HexEditors\HexEdit.exe "SELECTEDFILE"
Which you can then launch.

NOTE:
You can use the same keyword for both alias names and search/scoring keyword modifiers.
It is impossible to make anything foolproof because fools are so ingenious.

alijan

  • Participant
  • Joined in 2008
  • *
  • Posts: 4
    • View Profile
    • Donate to Member
Thanks!

I made this work by pressing tab after doing my everything search "ev somefile.txt" and appending the path with the alias.