DrFair

FairPad

May 4th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. rednet.open("back")
  2.  
  3. if not fs.exists( "papi" ) then
  4. print( "Performing first time setup." )
  5. shell.run( "pastebin","get", "BsrHWQbW", "papi" )
  6. print("Finished. Please run program again.")
  7. error()
  8. end
  9.  
  10. local Args = {...}
  11. if Args[1] == "update" then
  12. programName = shell.getRunningProgram()
  13. print("Updating.")
  14. fs.delete( programName )
  15. shell.run( "pastebin","get", "PcdGq3ms", programName )
  16. print("Finished updating.")
  17. error()
  18. end
  19.  
  20. os.loadAPI("papi")
  21. w,h = 26,20
  22.  
  23. function drawScreen()
  24. papi.clear()
  25. papi.resetButtons()
  26. if screen == "main" then
  27. papi.drawOutline( "FairPad", "By Fair", "black", "white" )
  28. end
  29. end
  30.  
  31. screen = "main"
  32. drawScreen()
  33.  
  34. while true do
  35. papi.submitEvents()
  36. lastEvents = papi.getEvents()
  37. end
Advertisement
Add Comment
Please, Sign In to add comment