Velocity API: getcursorposition

Version 1

    Return To Index

    Screen.getCursorPosition()

    Overview

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

    Added in version 1.2.4

    Use Cases

    • 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;
    ParameterDescriptionTypeRequiredNotes
    positionReturns a position object including row and column.ObjectReturnBoth row and column are 0-based numbers.

     

    Example

    /* 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);
    }