Advertisement
xMAC94x

redstone

Jul 22nd, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. --mMultiOS
  2. --<~t<true>marcelOS<info<0||name<0|execute>version<1|0.1>changePrint<2|false>eventfilter<0|key|char|mouse_click>EventManager<3|true>>>other<info<0||name<0|execute>version<2|0.1>>>>
  3. Application.window = windows.CreateWindow( "Blub" , Application , true)
  4.  
  5. local Button1 = winobj.TButton("TButton",Application.window,Application.window)
  6. Button1.left = 2
  7. Button1.top = 10
  8. Button1.width = 30
  9. Button1.caption = "Redstone Pulse"
  10.  
  11. function ButtonOnClick()
  12. rs.setOutput("back",true)
  13. sleep(1)
  14. rs.setOutput("back",false)
  15. end
  16.  
  17. Button1.onClick = ButtonOnClick
  18.  
  19. Application.window:RegisterEvents(Application)
  20.  
  21. function getEvent(_event)
  22.  
  23. end
  24.  
  25. while true do
  26.     Application.window.l:clear()
  27.     Application.window:Paint()
  28.     EventHandle()
  29.     mTask.sleepEvent(Application,1)
  30.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement