window.getPosition

window.getPosition
Function
Syntax
window.getPosition()
Returns number x number y
API window
Source CC:Tweaked (source)

Returns the Position of a Window.

ExampleGet the Position of a Window
Get the Position of a Window and print it.
Code
<nowiki>
local win = window.create(term.current(),1,1,10,10)
print(win.getPosition())
  </nowiki>
Output
1 1
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.