printer.setCursorPos
From ComputerCraft Wiki
| Sets the cursor position on the page, works the same way as term.setCursorPos(). | |
| Syntax | printer.setCursorPos(number x, number y) |
| Returns | nil |
| Part of | ComputerCraft |
| API | printer |
Examples
| Sets the cursor position to the center of the paper and prints "X". | |
| Code |
local printer = peripheral.wrap("left") printer.newPage() local width, height = printer.getPageSize() printer.setCursorPos(math.floor(width/2), math.floor(height/2)) printer.write("X") printer.endPage() |