Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

GetWindowName() Function

  • Last UpdatedMar 01, 2021
  • 1 minute read

Retrieves the name of the window under which the function has been called.

Syntax

The syntax of the script function is as follows:

resultcode = GetWindowName(tagname);

Resultcode indicates the success or failure of the script function. The resultcode can be a Discrete/Integer/Real data type. Resultcode will be 1 or 0, based on the success or failure of the script function:

  • Resultcode is 1 when the script function is called from window context.

  • Resultcode is 0 when the script function is called from non-window context.

    Note: Configuration of the return value for the script function is optional. This is similar to the existing script functions in InTouch.

Parameter

TagName

The tagname is the out parameter for this function. This will be a message tag to retrieve the window name.

The parameter for the function can be any of the following:

  • InTouch tag

  • Dot field

  • Local variable in the script

  • Remote tag reference

  • Galaxy reference

The default text loaded by the script browser is:

GetWindowName(TagName);

Note: "TagName" is a message tag or Remote Tag Reference (RTR) which is of message type.

Return Value

The GetWindowName script function returns the window name with the return value of 1 in the following scenarios:

  • Window scripts (All Condition Types)

  • Push button action scripts (All Condition Types)

The GetWindowName script function returns an empty string with return value of 0 in the following scenarios:

  • Application scripts

  • Key scripts

  • Condition scripts

  • Data change scripts

  • ActiveX event scripts

  • Quick script functions (Synchronous and Asynchronous)

In This Topic
TitleResults for “How to create a CRG?”Also Available in