printer.getCursorPos

From ComputerCraft Wiki
Revision as of 16:19, 13 November 2012 by MathManiac0 (Talk | contribs) (Added Page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function printer.getCursorPos
Gives you the x- and y-position of the printer cursor.
Syntax printer.getCursorPos()
Returns The x- and y-position of the printer cursor.
Part of ComputerCraft
API peripheral

Examples

Grid paper.png  Example
Prints the cursor of the printer.
Code
local a, b = printer.getCursorPos()
print("X: ".. a ..", Y: ".. b)
Output X: <x position>, Y: <y position>