Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
open file selected in explorer
#1
A beginners question:
Assume I have a text file selected in Windows Explorer (or in any other file manager or file open dialog). Now I'd like to assign a parameter to a program (i.c. Notepad2) that points to that file in order to open it. Currently I have a hotkey assigned to a simple run command:

macro Notepad2:
Code:
Copy      Help
run "$program files$\Notepad2\Notepad2.exe"
The new macro should open the selected file:
Code:
Copy      Help
parm=.....
run "$program files$\Notepad2\Notepad2.exe" parm
where parm is the selected file.

If nothing is selected it should just run the program (as it currently does).
I don't want to use the standard Windows shell (e.g. linking notepad2.exe to .txt via the registry) or use anything that needs a mouse pointer action. Just one stroke with the hot key should open the selected file.
Now, this is just an example but it should be easy to extend to other file types/programs.
Does anyone knows how I can accomplish this?

Thanks!
#2
See GetPathsOfSelectedFiles macro in c:\program files\quick macros 2\installed files\samples2.qml.

And this post:
Full path of files selected
#3
I should refine my search strategy!
Thanks, Gintaras, works perfectly.


Forum Jump:


Users browsing this thread: 1 Guest(s)