Jump to content

associated script called path


Recommended Posts

Hi,

If I have a script (zipviewer.au3 for example) associated with .zip files how can I get the path the file called from? For example if I have a 'C:\test.zip' file , right click on it and choose open with zipviewer.au3, my script runs and I need the path and file name 'C:\test.zip'.

Sorry, for my English :)

Link to comment
Share on other sites

You should compile the .au3 file as an executable, then you can use $CmdLine or $CmdLineRaw to capture the path for example:

Compile the following as an zxt.exe

If $CmdLine[0] >= 1 Then    MsgBox(4096, "CmdLine", $CmdLine[1])

Create a file named File.zxt (for testing purposes only)

Right Click the file and Select OpenWith select zxt.exe.

It should now pop up with the path to the zxt file extension.

Hope that makes sense.

Edited by Subz
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...