Screen.getCursorPosition()

Overview

Get cursor position for the current screen. Only valid for TE hosts.

Added in version 1.2.4

Use Case

You would like to change how a script processes scan data based on cursor location.

Format

var position = Screen.getCursorPosition();

var row = position.row;

var column = position.column;

Parameter Description Type Required Notes
position Returns a position object including row and column. Object Return Both row and column are 0-based numbers.

Example

Copy
/* Beep if the cursor is on the 5th row and 5th column.
*/
 
var position= Screen.getCursorPosition();
if(position.row == 4 && position.column == 4) {
    Device.beep(1000,200,10);
}