## test VBScript - basic call
# this simple script just calls a VBScript function that prints "WinCron Rocks" in a loop.
# The script then calls the WinCron-defined, VB function Print() to print some status info
{
-name test VBScript
-start
-stop
# call a VBScript Function (can't call Subs directly)
main("WinCron Rocks")
# print the return value from the VBScript function
Print("Returned value is: '%TG.COMMAND_RETURN%'")
# call one of the internal, WinCron-defined, VB functions
# (there are a bunch of these internal functions, documentation to come)
# Hey look! The usual WinCron macros still expand inline!
Print("Done! at %c%")
}
'' Entering the VBScript domain!
' Notice how comments are now VBScript style?
Option Explicit ' Force declarations for variables
Function main(args)
' simple loop to print the passed in string.
' we also prints a counter and another built-in WinCron macro!
Dim jx
For jx = 1 To 1024
WCCtrl.Print jx & " " + args + " !!%#W%"
Next
' return whatever you want. We've decided to return the current time
main = time
End Function