Jump to content

running an autoit script via vbs


Recommended Posts

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...