Advertisement
rhn

Elevator

rhn
May 14th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. mouseWidth = 0
  2. mouseHeight = 0
  3. -- this creates two variables called mouseWidth
  4. -- and mouseHeight and sets them to 0.
  5.  
  6. monitor = peripheral.wrap("bottom")
  7. -- you need this line! It tells the computer
  8. -- the monitor at bottom.
  9.  
  10. monitor.clear()
  11. -- this clears the monitor screen
  12.  
  13. monitor.setCursorPos(1,1)
  14. -- this sets the cursor position to the top left
  15. -- corner of the monitor
  16.  
  17. w,h=monitor.getSize()
  18. -- gets the width and the height of the monitor
  19. -- and stores the numbers as w and h.
  20. -- w and h are variables
  21.  
  22. print(w)
  23. print(h)
  24. -- prints the w and h to the computer screen.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement