Finding the position of the cursor when using citrix


#1

When building an automation project using citrix, how can you determine what position or field the cursor is in? I need the ability to know where cursor is at on the screen, so I can move the cursor to the desired field that needs input. Thanks


#2

Hello!

You can use the Citrix Recording to use a fixed image to move your cursor. So the Robot will use that fixed image as a reference to move to the field that you need. This is often used when more than one field are equal and doesn’t have anything to distinguish it.

If you really want the Mouse Position, you can use the follow code on Invoke Code Activity

Dim positionX As String
Dim positionY As String

positionX = System.Windows.Forms.Cursor.Position.X.ToString
positionY = System.Windows.Forms.Cursor.Position.Y.ToString

result = positionX & "," & positionY

Hope It Helps :slight_smile:

Regards,