schmidty1913 Posted January 8, 2006 Share Posted January 8, 2006 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 8, 2006 Share Posted January 8, 2006 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 programI 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 Link to comment Share on other sites More sharing options...
schmidty1913 Posted January 8, 2006 Author Share Posted January 8, 2006 How would i do that? can u send the function please Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 8, 2006 Moderators Share Posted January 8, 2006 Look at Command Line Parameters / Envset / Envget in the help file. 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. Link to comment Share on other sites More sharing options...
CyberSlug Posted January 8, 2006 Share Posted January 8, 2006 Two files (parent and child).... run Parent.au3 parent.au3EnvSet("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.au3MsgBox(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! 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