Advertisement
karelvysinka

STARTUP

May 7th, 2015
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. -----------------------------------------------
  2. --DISPLAY LAMP FIRMWARE UPDATER STARTUP PASTEBIN: UHu7h5em
  3. -----------------------------------------------
  4. --test key
  5. function TestKey()  
  6.   while true do
  7.     local event, scancode = os.pullEvent("key")
  8.     print(tostring(scancode).." was pressed.")
  9.   end
  10. end
  11.  
  12. -----------------------------------------------
  13. --update
  14. function Update()
  15. if fs.exists("startup2") == true then
  16. --fs.delete(startup2)
  17. end
  18. --load startup2 from the web
  19. --shell.run("pastebin get NkzsSg1M startup2")
  20.  
  21. end  
  22. -----------------------------------------------
  23. --start program
  24.  
  25. while true do
  26.   print("Starting program STARTUP...")
  27.   if message == "up" then
  28.     Update()
  29.   end
  30.   shell.run("startup2")
  31.   print("Stoping program STARTUP...")
  32. end
  33. -----------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement