Difference between revisions of "Term.getCursorPos"
From ComputerCraft Wiki
m (moved Term.getCursorPos() to Term.getCursorPos) |
(localised) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=term.getCursorPos | |name=term.getCursorPos | ||
− | |args= | + | |args= |
|returns=x, y | |returns=x, y | ||
|api=term | |api=term | ||
Line 10: | Line 10: | ||
{{Example | {{Example | ||
|desc=Prints the location of the cursor on screen. | |desc=Prints the location of the cursor on screen. | ||
− | |code= | + | |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() |