term.setCursorPos
From ComputerCraft Wiki
Function term.setCursorPos | |
Sets the location of the cursor on screen. | |
Syntax | term.setCursorPos(number x, number y) |
Returns | none |
Part of | ComputerCraft |
API | term |
Examples
Note that the x and y coordinates cannot be placed between lines. Floating point values (such as 1.5) will be rounded down to integers (like 1, in this case).
Basic usage
Example | |
Sets the location of the cursor on screen to the top | |
Code |
term.setCursorPos(1,1) |
Using the old cursor position to affect the new one
Example | |
Sets the location of the cursor to the start of the line. | |
Code |
oldx, oldy = term.getCursorPos() |