Sign in to follow this  
Followers 0
schmidty1913

help please

5 posts in this topic

I was wondering if i could RunWait from one compiled .exe program to another one of my compiled .exe programs and carry over the variables to the other program

Share this post


Link to post
Share on other sites



I was wondering if i could RunWait from one compiled .exe program to another one of my compiled .exe programs and carry over the variables to the other program

I think when you run the second script it will start in it's own environment, blissfully unaware of any variables set in the first script. You could, however, pass variables as command line arguments, or you could write required data to a file and pass that.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

How would i do that? can u send the function please

Share this post


Link to post
Share on other sites

Look at Command Line Parameters / Envset / Envget in the help file.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Two files (parent and child).... run Parent.au3

parent.au3

EnvSet("foo", "There is a maximum length, possibly 255 characters for this type of variable...")

; The following would probably be replaced with RunWait("child.exe") once compiled...
RunWait(@AutoItExe & " " & "child.au3" & " " & "commandLineArg1 aSecondCommandLineArg")

child.au3

MsgBox(4096,"Foo is", EnvGet("foo"))

If $CmdLine[0] > 0 Then
    For $i = 1 to $CmdLine[0]
    MsgBox(4096,"Arg #" & $i & " is", $CmdLine[$i])
    Next
EndIf

If you have a bunch of variables or if you use arrays, you'll need to look at FileWrite / FileRead or FileReadLine / FileWriteLine. Help file has examples for those functions.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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  
Followers 0