Advertisement
DanielLaby99

Internet

Mar 17th, 2013
1,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.05 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. shell.run("/Laby/Desktop")
  3. term.setTextColor(colors.white)
  4. term.setBackgroundColor(512)
  5. sleep(0)
  6. term.setCursorPos(1,19)
  7. term.setBackgroundColor(colors.green)
  8. write(" Menu ")
  9. term.setBackgroundColor(colors.blue)
  10. write("                                              ")
  11. term.setBackgroundColor(colors.blue)
  12.  
  13.  
  14. function Zeit()
  15.          pzeit = os.time()
  16.          pzeit = textutils.formatTime(pzeit, true)
  17.     return pzeit     
  18. end
  19.  
  20.  
  21.  
  22. while true do    
  23.       term.setCursorPos(46,19)
  24.       write(""..Zeit())
  25.       write(" ")
  26.       sleep(0.1)
  27. break
  28. end
  29.  
  30.  
  31.  
  32. sleep(0.1)
  33. term.setCursorPos(1,1)
  34. term.setTextColor(colors.white)
  35. term.setBackgroundColor(colors.blue)
  36. write("                 Internet Browser                 ")
  37. term.setBackgroundColor(colors.red)
  38. write("X")
  39. term.setBackgroundColor(colors.white)
  40. term.setTextColor(colors.black)
  41. print("                                                   ")
  42. print("    Downloads:                                     ")
  43. print("    X Skype                                        ")
  44. print("    X LabyWord                                     ")
  45. print("    X LabyOS Update                                ")
  46. write("    X Taschenrechner                                             ")
  47. print("                                                   ")
  48. print("                                                   ")
  49. print("                                                   ")
  50. print("                                                   ")
  51. print("                                                   ")
  52. print("                                                   ")
  53. print("                                                   ")
  54. print("                                                   ")
  55. print("                                                   ")
  56. print("                                                   ")
  57. print("                                                   ")
  58. print("                                                   ")
  59. print("                                                   ")
  60.  
  61. term.setCursorPos(1,2)
  62. term.setBackgroundColor(colors.white)
  63. term.setTextColor(colors.black)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. while true do
  71. local event, button, X, Y = os.pullEvent("mouse_click")
  72. XY = X..","..Y
  73.  
  74. if XY == "2,19" and button == 1 then
  75. shell.run("/Laby/start")
  76. break
  77. end
  78.  
  79. if XY == "3,19" and button == 1 then
  80. shell.run("/Laby/start")
  81. break
  82. end
  83.  
  84. if XY == "4,19" and button == 1 then
  85. shell.run("/Laby/start")
  86. break
  87. end
  88.  
  89. if XY == "5,19" and button == 1 then
  90. shell.run("/Laby/start")
  91. break
  92. end
  93.  
  94. if XY == "51,1" and button == 1 then
  95. term.setTextColor(colors.white)
  96. shell.run("/Laby/gast")
  97. break
  98. end
  99.  
  100.  
  101.  
  102.  
  103. if XY == "5,3" and button == 1 then
  104.  if fs.exists("/Laby/Downloads/Skype") then
  105. term.setCursorPos(1,9)
  106. print("    Skype ist bereits installiert.")
  107. sleep(2)
  108. shell.run("/Laby/Internet")
  109. else
  110. fs.copy("/Laby/Inet/Skype", "/Laby/Downloads/Skype")
  111. term.setCursorPos(1,9)
  112. write("    Downloading Skype..")
  113. sleep(3)
  114. term.setTextColor(colors.white)
  115. shell.run("/Laby/Download")
  116. end
  117. break
  118. end
  119.  
  120.  
  121.  
  122.  
  123. if XY == "5,4" and button == 1 then
  124.  if fs.exists("/Laby/Downloads/Word") then
  125. term.setCursorPos(1,9)
  126. print("    LabyWord ist bereits installiert.")
  127. sleep(2)
  128. shell.run("/Laby/Internet")
  129. else
  130. fs.copy("/Laby/Inet/Word", "/Laby/Downloads/Word")
  131. term.setCursorPos(1,9)
  132. write("    Downloading LabyWord..")
  133. sleep(3)
  134. term.setTextColor(colors.white)
  135. shell.run("/Laby/Download")
  136. end
  137. break
  138. end
  139.  
  140.  
  141.  
  142. if XY == "5,6" and button == 1 then
  143.  if fs.exists("/Laby/Downloads/calc") then
  144. term.setCursorPos(1,9)
  145. print("    Der Taschenrechner ist bereits installiert.")
  146. sleep(2)
  147. shell.run("/Laby/Internet")
  148. else
  149. fs.copy("/Laby/Inet/calc", "/Laby/Downloads/calc")
  150. term.setCursorPos(1,9)
  151. write("    Downloading Taschenrechner")
  152. sleep(3)
  153. term.setTextColor(colors.white)
  154. shell.run("/Laby/Download")
  155. end
  156. break
  157. end
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168. if XY == "5,5" and button == 1 then
  169.  
  170. term.setTextColor(colors.black)
  171. term.setCursorPos(5,9)
  172.  
  173. print("LabyOS wird neu Installiert...")
  174. sleep(1)
  175. shell.run("Laby/Inet/Update")
  176.  
  177. break
  178. end
  179. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement