Sign in to follow this  
Followers 0
HumbleBumble

trying to hand over information to my script

4 posts in this topic

Hi Guys!

My problem is the following:

i wrote a little script for automatic burning via Nero (nothing spectacular)

now i integrated this script in the context menu (explorer) with some changes in the registry

i want this script to burn the file i right click on and choose "burn" in the context menu

so the actual problem is how to tell my script which file (including path to it) it is

i realized it with a little box where i can get the filename via drag and drop [$GUI_DROPACCEPTED]

Has anybody an idea how i could hand over the filename and path by just clicking in the context menu (explorer)?

Best regards

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Hi,

Check the help file for 'Running Scripts' for more information on what i wll now telling you:

If $CmdLine[0] > 0 Then
    For $x = 1 To $CmdLine[0]
        MsgBox(0,$x,$CmdLine[$x])
    Next
Else
    MsgBox(0,"Test","The are now commandline parameters!")
EndIf

as you said you have add in the register a value for starting you program, for example this:

myapp.exe

by adding this; %1 it will add the file you have clicked on

so it will be

myapp.exe %1

i hope this will make clear?

Edited by Pakku

Share this post


Link to post
Share on other sites

myapp.exe %1
Agreed, with some double quotes suggested.

Share this post


Link to post
Share on other sites

that's what i was looking for :(

i guessed it should be the %1 (like notepad :shocked: ) but i didn't try it...don't ask me why

so thanks for your support!

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  
Followers 0