Cursor descriptor (<cursor> element)

The Cursor descriptor specifies a row and column location on the application screen, such as row 10 and column 50. For either the row value or the column value you can use an integer or any entity that evaluates to an integer (such as a variable, an arithmetic expression, or a call to an external Java method).

During screen recognition the macro runtime:
  1. Evaluates the row value and obtains an integer result.
  2. Evaluates the column value and obtains an integer result.
  3. Looks at the row and column location of the text cursor in the application screen (in its current state).
  4. Compares the row and column location in the descriptor with the row and column location of the text cursor in the application screen.

If the two locations are the same then the macro runtime evaluates this descriptor as true. Otherwise the macro runtime evaluates this descriptor as false.

When you are editing a Cursor descriptor and you want to specify the correct row and column values, you can use the Current button. The Current button is situated immediately to the right of the Row and Column fields in the Cursor descriptor window.

To use this feature follow these steps:
  1. Click on the session window to activate it (see Using the session window).
  2. In the session window, go to the application screen corresponding to the macro screen that you are working on.
  3. In the session window, use the mouse or the keyboard to set the text cursor to the location that you want.
  4. In the Cursor descriptor window click Current.
When you click Current the Macro Editor does the following:
  • Finds the location of the text cursor in the current session window and sets the Row and Column values to that location.