term.getCursorPos
Returns the current X and Y position of the cursor of the terminal object.
  | 
  |||
| Prints the cursor position of the current term. | |||
| Code | <nowiki>
local x, y = term.getCursorPos()
print(x, y)
  </nowiki>
 | 
    ||
| Output | 1, 3
 | 
    ||
Functions  | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| term.getCursorPos Function  | |
|---|---|
| 
Syntax term.getCursorPos()  | |
| Returns | number x, number y | 
| API | term | 
| Source | CC:Tweaked (source) | 
    This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.