Jump to content

Start Script by DBLClicking the Data file


 Share

Recommended Posts

I have a GUI script I wrote that will store data in a .SWL file. what I would love to be able to do is have the user be able to double click on the .SWL data file and have it launch the script and Populate all of the Data into my GUI script.

Right now I have to launch the script and then click File, Open, Select the .SWL file and it will populate the GUI with the correct data.

I tried Open With and then selecting my script but that does nothing. Any ideas? I would post the script for help but it's 1500 lines.

Thanks,

Mike

Link to comment
Share on other sites

some editing on the registry... example from larry:

RegWrite("HKCR\.qqq","","REG_SZ","qqq")
RegWrite ("HKCR\.qqq\ShellNew\")
RegWrite('HKCR\qqqfile\Shell\Open\Command','','REG_SZ','"notepad.exe" 
"%1"')

youd probably need the full path to notepad, but just replace the above code to fullfill your needs :)

FootbaG
Link to comment
Share on other sites

Thanks Layer,

That worked to open the Program but how do I detect via the script that it was launched by a .SWL file so I can have it load the proper data.

On a side note the "%1" can be replaced by any switch you need to launch the program. Mine was "/s"

Mike

Link to comment
Share on other sites

:)

I finally got it. Layers options would have worked right away but I have to use two switches. one /s to get into setup mode and then the second for the path of the .swl file. the final reg key that I used was

"D:\AutoIT-3\SwL.exe" "/s" "%1"

then $cmdline[2] is the path for the launched file.

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...