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":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: