Difference between revisions of "Term.getCursorPos"
From ComputerCraft Wiki
(Fixed grammatical error.) |
(localised) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{lowercase}} | |
+ | {{Function | ||
+ | |name=term.getCursorPos | ||
+ | |args= | ||
+ | |returns=x, y | ||
+ | |api=term | ||
+ | |addon=ComputerCraft | ||
+ | |desc=Returns the location of the cursor on screen. | ||
+ | |examples= | ||
+ | {{Example | ||
+ | |desc=Prints the location of the cursor on screen. | ||
+ | |code=local x, y = term.getCursorPos()<br />print(x .. ", " .. y) | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | [[Category:API_Functions]] |
Latest revision as of 07:51, 23 January 2013
Function term.getCursorPos | |
Returns the location of the cursor on screen. | |
Syntax | term.getCursorPos() |
Returns | x, y |
Part of | ComputerCraft |
API | term |
Examples
Example | |
Prints the location of the cursor on screen. | |
Code |
local x, y = term.getCursorPos() |