VBScript examples

Automation Workshop includes Execute script Action which, besides supporting other scripting formats, can execute VBScript scripts automatically. The basic VBScript examples provided below are aimed at giving the user a rather general idea how to integrate custom scripts into automated Tasks.

The data communication with other scripts is based on screen output. The screen output of the script can be retrieved by using Variable Wizard from subsequent Execute script Action. It is possible to retrieve either full screen output or any of the first six output lines separately.

VBScript example #1
  • Option Explicit
    Dim text
    text="Hello world!"
    WScript.Echo(text)
VBScript example #2
  • Option Explicit
    Dim myNum, myOut
    myNum=7

    If myNum < 5 Then
       ' This will not print because 7 is larger than 5
       WScript.Echo("Number is less than 5")
    End If

    myOut=myNum & myNum
    WScript.Echo(myOut) ' 77

    myOut=myNum + myNum
    WScript.Echo(myOut) ' 14

If you have any questions, please do not hesitate to contact our support team.

© 2001–2019 Febooti Ltd.