joeloyzaga Posted December 21, 2009 Share Posted December 21, 2009 is it possible to run an autoit script from vbs? and can autoit send values back as strings or do I need to use environment variables? thanks joe Link to comment Share on other sites More sharing options...
Mat Posted December 21, 2009 Share Posted December 21, 2009 It can. You can run it using the WScript object, and copy the rest off the internet (thats what I did...) Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") Set objExec=WSHShell.Run "Autoit3.exe /AutoIt3ExecuteScript MyScript.au3", 1, false Do While Not objExec.StdOut.AtEndOfStream strCmdOutText=objExec.StdOut.ReadLine() If InStr(strCmdOutText, "Error") then bolError = true Wscript.Echo Date & " " & Time & " Error Running exe" End If Loop Set WSHShell = Nothing WScript.Quit(0) I have never coded in vbs in my life. Neither have I tested the code. Mat AutoIt Project Listing 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