GetWindowPosition() views a child window (such as Replace, Overlay, and Popup
type windows) coordinates in pixel values.
Function requires InTouch 7.0 or later.
Installing the GetWindowPosition() Function
Download
the WndUtils.zip file from the Wonderware Knowledge Base.
Unzip the file that you downloaded and move the files WndUtils.dll,
Wndutils.wdf and WndUtils.txt to your InTouch directory.
Using the GetWindowPosition() Function
Prototype:
GetWindowPosition(WindowName, Left, Top, Right,
Bottom, UseDesktop);
Return Type:
Integer value. The value is one (1) if successful in retrieving coordinates
for specified window, and zero (0) if there was a failure. A failure can result
if the window name specified is not valid, or one of the tags is not valid. See
WWLogger for more details on a failure (except for invalid window name).
Parameters:
WindowName – A string which contains the name of the window. This
is case sensitive.
Left – A string which contains the name of an INTEGER tag to receive
the value in pixels of the left hand side of the window.
Top – A string which contains the name of an INTEGER tag to receive
the value in pixels of the top of the window.
Right – A string which contains the name of an INTEGER tag to receive
the value in pixels of the right hand side of the window.
Bottom – A string which contains the name of an INTEGER tag to receive
the value in pixels of the bottom of the window.
UseDesktop – An Integer value of one (1) to use the windows desktop
upper left hand corner as the reference for the coordinates returned. An integer
value of (0) can be used to use the upper left hand corner of the WindowViewer
client area as the reference for the coordinates returned.
For more information, see the WndUtils.txt file.
One thought on “GetWindowPosition Script Function”
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
hi ! this function can be used in the 2014R2 intouch installation ?
thanks !