Script extesions

<< Click to Display Table of Contents >>

Navigation:  Actions > Script tools >

Script extesions

The RoboTask gives some extensions of the language (for VB Script and JS Script): several additional functions. You can use this functions freely in your texts of scripts. Notice that the JavaScript is case sensitive. But the functions of extensions work insensitive to a using register. Thereby, the expressions

LogMessage("Hello World!!!");

logmessage("Hello World!!!");

are identical.

 

function LogMessage(AMessage)

The function outputs a message to a log. In edit mode of a script, the function outputs a message to the log of the editor. When a task works, a message is output to a log of the task in the mode User Message.

AMessage - the string to output

 

function include(ScriptFileName)

This function returns the text of specified script file.

ScriptFileName – The name of file which is necessary to load.

 

You can execute this text in your script. Just put these into you script:

for VB Script action use

execute include("d:\myscripts\script.txt")

 

For JS Script action use

eval(include("d:\\myscripts\\script.txt"));

 

function Pause(AMilliseconds)

Pauses and stops execution of the script for the specified time.

AMilliseconds - pause time in milliseconds.

 

function Messagebox(AMessage)

Displays a dialog box with the specified message

AMessage - the message as a string

 

function RoboTaskApp()

This function returns the COM object RoboTask. This object allows to use some functions of the RoboTask directly from a script. The description of the object is in the chapter "RoboTaskApp Object".

 

 

note Related Topics

JS script

JS Evaluate

VB Script

VB Evaluate

RoboTaskApp object