Jump to content
Sign in to follow this  

running an autoit script via vbs

Recommended Posts


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

Share this post

Link to post
Share on other sites

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
If InStr(strCmdOutText, "Error") then
bolError = true
Wscript.Echo Date & " " & Time & " Error Running exe"
End If

Set WSHShell = Nothing

I have never coded in vbs in my life. Neither have I tested the code.


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