Jump to content

Pass Variables Between Scripts


Rieq82
 Share

Recommended Posts

Hi guys,

     I've been toying with AutoIT for just a few days now and I've run into a bit of a brick wall.  I'm working on trying to pass a variable from script1 to script2, currently it looks something like this:

     Script1: $variable =  "Test"   

                    Run('AutoIt3.exe "scripts\script2.au3" $variable')    

     Script2:  MsgBox("0", "Test Box", $CmdLine[1])

     Everything works, except when the message box for script 2 launches it comes up with $variable instead of Test.  The variable is getting passed to the second script but it's not being evaluated before it's passed, it's sending the variable instead of the value.

     Is there a way to send the value of a variable instead of hardcoding the data to be passed between scripts?

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