Difference between revisions of "Term.getCursorPos"
From ComputerCraft Wiki
(You mean "Destroyed page"?) |
(Fixed broken example and removed "none" from args) |
||
| 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=x, y = term.getCursorPos()<br />print(x .. ", " .. y) |
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] | ||
Revision as of 07:50, 23 January 2013
| Returns the location of the cursor on screen. | |
| Syntax | term.getCursorPos() |
| Returns | x, y |
| Part of | ComputerCraft |
| API | term |
Examples
| Prints the location of the cursor on screen. | |
| Code |
x, y = term.getCursorPos() |