This article from InSource shows how to capture the mouse cursor from within an ArchestrA graphic using Wonderware Application Server.
- Author: Joseph Hefner
- Published: 7/26/2016
- Applies to: Application Server 2014 R2 or later.
Step 1: Import the System.Windows.Forms dll by going to Galaxy \ Import \ Script Function Library and choosing the dll from the following location:
Step 2: Create custom properties to hold the cursor values. In this example, they are called XPos and YPos.
Step 3: Create a graphic to display the values and link them to the custom properties:
Step 4: Right click a blank space in the graphic and choose "Scripts" and add the script below to assign the cursor values to the customer property:
XPos = System.Windows.Forms.Cursor.Position.X;
YPos = System.Windows.Forms.Cursor.Position.Y;