term.getCursorPos

From ComputerCraft Wiki
Revision as of 07:50, 23 January 2013 by Cruor (Talk | contribs) (Fixed broken example and removed "none" from args)

Jump to: navigation, search


Grid Redstone.png  Function term.getCursorPos
Returns the location of the cursor on screen.
Syntax term.getCursorPos()
Returns x, y
Part of ComputerCraft
API term

Examples

Grid paper.png  Example
Prints the location of the cursor on screen.
Code
x, y = term.getCursorPos()
print(x .. ", " .. y)