Jump to content
Sign in to follow this  
rakudave

Auto-open with autoit?

Recommended Posts

rakudave

i'm scripting a sudoku-program, that also can save and load sudoku's.

in windows, you can open a file by clicking on it and it will start the program

AND open the file in it.

q: is this possible with autoit, and if yes, who???

Edited by rakudave

Share this post


Link to post
Share on other sites
MSLx Fanboy

Compile to exe, and the first param sent to the exe would be the full path of the file that is being opened

If $cmdline[0] > 0 Then
Run(@COMSPEC & ' /c notepad.exe ' & $cmdline[1])
EndIf

Compile that code, associate a text file to it, and it will auto-open those files in notepad...


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites
LxP

Or even more simply:

if ($cmdLine[0] > 0) then
    run('notepad.exe ' & $cmdLine[1])
endIf

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.