Jump to content

pass variable to .exe script


masonje
 Share

Recommended Posts

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

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

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