Jump to content
Sign in to follow this  
Maarten002

How To Get The File From a Right Click?

Recommended Posts

Maarten002

I'm writing a script that i want to put in the contextual menu of the finder. I was already able to put the compiled script in the contextual menu (HKEY_CLASS_ROOT/*/shell/...).

The thing I'm missing is how to get the name of the file/files that i right clicked on. Anyone an idea?

Thanks :)

Share this post


Link to post
Share on other sites
mikell

First compile this script, name it "myscript.exe" and put it in C:

GuiCreate("", 500, 50, -1, 30)
GuiCtrlCreateInput($CmdLine[1], 10, 10, 480, 20)
GuisetState()
While GuiGetMsg()<>-3
Wend

Then build your registry key : HKEY_CLASSES_ROOT*shellmyscriptcommand

with this value : C:myscript.exe "%1"

Share this post


Link to post
Share on other sites
Maarten002

Oops, i forgot the "%1" at the end of the path :> , that was why my script was giving a lot of strange errors (in line 400 and something while my script only had 5 lines...).

Thanks a lot, very appreciated!

Share this post


Link to post
Share on other sites
KaFu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×