applyguiscript

The applyguiscript command passes variables from a WS script to a Visual Basic (VB) script.

The applpyguiscript command is useful primarily when a user is dealing with special controls such as grids or ActiveX controls. The syntax is as follows:

applyguiscript('filename.vbs');
applyguiscript('C:\\guixt\\vbscripts\\filename.vbs');

Either the full path or the relative path for the VBScript file can be used. In our example we are using the relative path, meaning that the command will look only in the designated script directory.

Options

The applyguiscript command takes the following option:

"template":true

Enables users to execute a pre-made template with the particular variables from the individual screen. The template option used with applyguiscript enables a user to create a VBS file which is then called with the applyguiscript command. When applyguiscript is invoked, the template is copied into a temporary file and all variables in the template are replaced with the actual values from the screen in question. The VBS file then executes using these variables. This is very useful when a number of different values must be operated on in a similar manner. One script only needs to be written, but it can be called any time necessary. The syntax for this is as follows:

applyguiscript("filename", {"template":true});