BrianH Posted November 16, 2005 Share Posted November 16, 2005 Here is my simple hello.bat file echo "hello" pause set I pause set IAMvalue="hello" pause set I pause exit 1 and my even simpler autoit3 script EnvSet("IAMvalue","first") $res=RunWait("HELLO.bat") If $res=1 Then MsgBox(0,"", EnvGet("IAMvalue")) The value "first" appears in the batch script which changes it to "hello" but the msgbox displays the value "first", so the changed value does not survive the exit from the batch script. Is there a way to pass a value from AutoIT3 to a batch script, and return a changed value ? Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 16, 2005 Share Posted November 16, 2005 To my small extent of knowledge this isnt possible using strictly variables. Maybe the STDRead/Write commands may help. Also piping the output to a file and then working from there may be useful. One other thing I feel would be useful to point out is that AutoIt should be able to perform any operation you are having performed by a .bat script. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
BrianH Posted November 25, 2005 Author Share Posted November 25, 2005 To my small extent of knowledge this isnt possible using strictly variables. Maybe the STDRead/Write commands may help.Also piping the output to a file and then working from there may be useful.One other thing I feel would be useful to point out is that AutoIt should be able to perform any operation you are having performed by a .bat script.JSThanks for the info. I was calling someone else's .bat script but found it easier to rewrite in AutoIT3 than try to get the variable passing to work 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