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
| 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 |
local x, y = term.getCursorPos() |