term.getCursorPos

From ComputerCraft Wiki
Revision as of 12:51, 22 January 2013 by Cruor (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
local x, y = term.getCursorPos()
print(x .. ", " .. y)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox