MoveCursor() action

From The x3270 Wiki

The MoveCursor() action moves the terminal cursor to a specific location. It uses 0-origin coordinates.

Parameters

If two parameters are specified, they are:

row
The 0-origin row number. New in 4.3: The value can be negative to indicate a position relative to the bottom of the screen.
column
The 0-origin column number. New in 4.3: The value can be negative to indicate a position relative to the bottom of the screen.

If one parameter is specified, it is:

offset
An absolute cursor offset. New in 4.0

On x3270 only, MoveCursor() can be invoked with no arguments, which causes the 3270 cursor to be moved to the location of the mouse cursor. Such a call can only be made from a keymap.

Restrictions

New in 4.3 MoveCursor() is invalid in NVT mode. Prior to 4.3, MoveCursor() would work in NVT mode, but this was unlikely to have the intended effect. This is because there is no way for the emulator to tell the host that the cursor has moved. This would cause unexpected results on AS/400 / IBM i series hosts, where it is not always apparent that the session is running in NVT mode.

Examples

Move the cursor to the upper left-hand corner of the screen.

MoveCursor(0,0)

Move the cursor to the last column of the second row of the screen (on a model 2) using row and column coordinates.

MoveCursor(1,79)

Move the cursor to the last column of the second row of the screen (on a model 2) using an offset. Note that cursor offsets are always 0-origin. New in 4.0

MoveCursor(159)

Move the cursor to the first column of the last row of the screen. New in 4.3

MoveCursor(-1, 0)

See also

MoveCursor1() action: the 1-origin version of MoveCursor()