Liquid UI - WS Reference Library

applyguiscript()


Purpose

With applyguiscript(), you can pass variables from WS script to a Visual Basic (VB) script.

The applyguiscript() command is useful primarily when a user is dealing with special controls such as grids or ActiveX controls.


Syntax

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

Note: You can specify the file path in the command, if the file is not existing in the scripts folder.

applyguiscript('C:\\guixt\\vbscripts\\filename.vbs',{"template":true});

You can either mention the directory path or the relative path for the VBScript file. In our example, we are using the relative path, means the command will look only in the specified script directory.


Option

"template":".."

"template":true - Enables a user to create a VBS file, which is then called with the applyguiscript command.

Option Detail

The applyguiscript() command takes the following option:

template

  1. This option enables a user to create a VBS file which is then called using applyguiscript command. The VBS file, then executes using these variables.

  2. This is very useful when different values of a screen must be operated on in a similar manner, where we can include the script that can be called at any time necessary using the command.

  3. applyguiscript("applygui.vbs",{"template":true});
  4. As per the code, applygui.vbs file is attached to the SAP GUI and creates a temporary file.


Example