Difference between revisions of "Printer.getCursorPos"

From ComputerCraft Wiki
Jump to: navigation, search
(Added Page)
 
m (Moved to CAT:LuaCoreFunctions)
Line 13: Line 13:
 
}}
 
}}
 
}}
 
}}
 +
 +
[[Category:Lua_Core_Functions]]

Revision as of 18:50, 28 November 2012


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>