topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Tuesday March 19, 2024, 4:47 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: Run a program with file(s) selected in Explorer  (Read 3953 times)

pmoore

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Run a program with file(s) selected in Explorer
« on: March 21, 2013, 05:43 PM »
Is it possible with FARR to select a file in Explorer, then activate FARR, select a program, and have that program open the file selected in Explorer?

What I'm thinking of is being able to edit any file in Vim (my text editor) by finding the file in Explorer, then getting FARR to run Vim on that file. Sort of like an explorer context menu item, but using FARR.

Paul

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Run a program with file(s) selected in Explorer
« Reply #1 on: March 23, 2013, 09:22 AM »
AFAIK, not out-of-the-box, but with a combination of some pieces, may be.

I've come across a variety of attempts in AHK to access the current Windows Explorer selection -- the following attempted to leverage some of that:

  https://www.donationcoder.com/forum/index.php?topic=21223.0

I don't think it was that robust, but YMMV.  If it doesn't work for you, may be someone can pull together something that does :)

Another piece to consider using is the Akete plugin:

  https://www.donationcoder.com/forum/index.php?topic=16178.0

IIRC, the Experimental version and the version in the git repository provide the ability for one's customized file-extension associations to appear on the context menu for corresponding FARR results:

akete-context-menu.pngRun a program with file(s) selected in Explorer

The following is the corresponding configuration for what I've got installed here (the git version):

[Akete]
IniPath.QDir = %APPDRIVE%\apps\Q-Dir\Q-Dir.ini
IniPath.Xenon = %APPDRIVE%\apps\XenonPortable\Data\settings\assoc.ini
Folder.* = %APPDRIVE%\apps\NirLauncher\NirSoft\HashMyFiles.exe /folder "$$1"|%APPDRIVE%\apps\SmartGit\bin\smartgit.exe --open "$$1"|%APPDRIVE%\apps\emacs\bin\runemacs.bat
* = %APPDRIVE%\apps\Notepad++\notepad++.exe|%APPDRIVE%\apps\emacs\bin\runemacs.bat|%APPDRIVE%\apps\NirLauncher\NirSoft\HashMyFiles.exe /file "$$1"
txt=%windir%\system32\notepad.exe|%APPDRIVE%\apps\Notepad++\notepad++.exe
3gp = %APPDRIVE%\apps\VLCPortable\VLCPortable.exe
mp4 = %APPDRIVE%\apps\VLCPortable\VLCPortable.exe
pdf = %APPDRIVE%\apps\SumatraPDF\SumatraPDF.exe|%APPDRIVE%\apps\PDFX_Vwr\PDFXCview.exe

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Run a program with file(s) selected in Explorer
« Reply #2 on: March 26, 2013, 03:37 AM »
I don't have a general solution. I wish it was possible to drag and drop files onto FARR search result items in the same way you can drag a drop a file (file.txt) on a shortcut to a program (firefox) to start that program with the file as command line parameter.

A quick way to open a file in explorer in a program that is not default for that filetype can be had through autohotkey:
#IfWinActive, ahk_class CabinetWClass
#Enter::
#Lbutton::
send ^c
clipwait
run notepad.exe "%clipboard%"
#IfWinActive
Replace notepad.exe below with your VIM path. Then win+click a file in Explorer. Or select the file in Explorer and press win+Enter.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Run a program with file(s) selected in Explorer
« Reply #3 on: March 26, 2013, 04:23 AM »
I wish it was possible to drag and drop files onto FARR search result items in the same way you can drag a drop a file (file.txt) on a shortcut to a program (firefox) to start that program with the file as command line parameter.

I'd like this too.  IIRC, mouser said there is a technical issue with implementing this.  May be things have changed recently...