Jump to content

Recommended Posts

Posted

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

Posted (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 by gamerman2360
Posted

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)

NEWHeader1.png

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
  • Recently Browsing   0 members

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