Advertisement
guamie

get monitor size

Jul 14th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. --get monitor size
  2.  
  3.  
  4. mouseWidth = 0
  5. mouseHeight = 0
  6. monitor = peripheral.wrap("top")
  7. monitor.clear()
  8. monitor.setCursorPos(1,1)
  9. w,h=monitor.getSize()
  10. term.redirect(monitor)
  11. print(w)
  12. print(h)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement