masonje Posted December 21, 2005 Share Posted December 21, 2005 How do I execute an autoit script that looks like this... Dim $t MsgBox(0, "test", $t) ...then I want to run it with a statement something like... test.exe $t="Jon" ...I know that does not work, but I'm sure there is some way. I looked through the documentation, but couldn't find it. I'm sure I just wasn't looking for the right key words. Thanks, MasonJE Link to comment Share on other sites More sharing options...
gamerman2360 Posted December 21, 2005 Share Posted December 21, 2005 (edited) If you have something like 'test.exe $t="Jon"' run. There is a var $CmdLine[0] that will be set to 1 and $CmdLine[1] will be set to '$t="Jon"'... In the helpfile look up command line parameters. [edit] Added quotes. Edited December 21, 2005 by gamerman2360 Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 heres an example ; Command Line decompile to desktop ; Author Skruge If $CMDLine[0] > 0 Then If $CMDLine[1] = "/decompile" Then GetSource() EndIf ; Main Code Here Func GetSource() FileInstall("MyScript.au3", @DesktopDir & "\") Exit EndFunc ;==>GetSource and the syntax would be "myprogram.exe /decompile" 8) Link to comment Share on other sites More sharing options...
masonje Posted December 22, 2005 Author Share Posted December 22, 2005 $CMDLine[1] = "/decompile"... "myprogram.exe /decompile" That was exactly what I was looking for. Thanks a tun! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now