VB Script

<< Click to Display Table of Contents >>

Navigation:  Actions > Script tools >

VB Script

This action allows to perform a program, which is written in VB Script. Notice that the languages Visial Basic and VB Script are not the same, although they are very alike. The documentation for the language can be read on the Microsoft site: http://msdn.microsoft.com/en-us/library/t0aew7h6(v=vs.84).aspx

The action editor is a specialize text editor adapted for editing a program code.





Popup proposals.

When pressing the Ctrl-Space, a popup menu with some functions and objects of VB Script shows up on the screen. One can choose a necessary point from the list and then the editor will insert a proper line/string into a text.

If you began to enter a function name and pressed the Ctrl-Space, only alternatives corresponding to the input line will be left in the popup menu.



This function allows to insert standard language constructions into a text automatically. For this you need to enter 2-5 key constructions (identifier of construction) and press the combination Ctrl-J. The editor inserts the whole construction instead of the key word.

The editor supports the next statements:



Insert statement


"do" loop



loop |


"For each" loop

for each | in




Simple "for" loop

for i=0 to | step 1




Function declaration template

function |()


end Function


Simple "IF"

if | then


end if


IF .. Else stetement

if | then




end if


Select case statement

select case |




end select


Sub procedure declaration

sub |()


end sub


"While" loop

while |




"With" statement

with |


end with




Load from file

Load the text of a script from a file.


Save script as file

Save the text of a script into a file.


Additional options

Expand Variables in the script - If to switch on this mode, the RoboTask expands all inserts of variables in a text before running of the script.

Save Final script into variable – If it is necessary to monitor the final text of the script, switch on this checkbox and enter the variable name. This mode is need only for control and checkout. The fact of the matter is that the substitution of variable values can break down the syntax of a script text. By means of this mode it is possible to get the final script and analyze it if it is necessary.


The field of a log is under the editor. The messages about runtime errors of the script are output into this field. Also the text of messages LogMessage is output here.


Run script

Running of a script from the editor to test. If a runtime error arises, you can see a message about the error in the field of the edit log.



Activation of a help system.



note Related Topics

JS script

JS Evaluate

VB Evaluate

RoboTaskApp object