open selected file
-
Hi all.
I have set a function key on my windows 7 machine to start Notepad++. Works as expected.
I would like to find a way to use that key to open Notepad++ with the currently selected file from explorer.
What I’m looking to do is select a file in explorer, hit the function key, and have the file open in Notepad++. I just can’t figure out what to pass on the command line for the selected file.
Any ideas?Thanks in advance for any ideas,
Kevin Fonda -
without knowing how you did it exactly, a common practice for explorer or registry tweaks is to
use the %1 as a variable which gets replaced by the complete filename.Cheers
Claudia -
What I did was to use the Logitech SetPoint software to set the function key to ‘Launch a Program’. I set the program to launch to
“C:\Program Files (x86)\Notepad++\notepad++.exe” “%1”
It looks like the command line doesn’t see a selected file as ‘%1’.
I guess what I need is a way to access the name of the currently selected file from the command line. -
What I did was to use the Logitech SetPoint software to set the function key to ‘Launch a Program’
OK, I guess this doesn’t work as long as the SetPoint program hasn’t a functionality to communicate with explorer/shell objects.
I guess what I need is a way to access the name of the currently selected file from the command line.
I didn’t use it myself but maybe AutoIt (or similar sw) might be helpful in such a case.
Afaik AutoIt has the possibility to work with COM objects, if so it should be possible
to get the running explorer and shell instance and get the selected file.Cheers
Claudia
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login