Liquid UI - Documentation - 7.02 applyguiscript()

7.02 applyguiscript()


Purpose

With applyguiscript(), you can pass variables from the WS script to a Visual Basic (VB) script. This command allows you to execute the VB script and attach it to the SAP GUI.

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


Syntax

Format 1: You can add the vbs file name directly in the command if the file exists in your scripts folder.

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.

 

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

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

 


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 is then executed 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, the applygui.vbs file is attached to the SAP GUI and creates a temporary file.


Usage Details


Can't find the answers you're looking for?