Advertisement
DanielLaby99

LabyOS [XP] Manager

Feb 11th, 2014
49,485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. -- ########################## -- Funktionen -- ############################ --
  2. local function s(...) return sleep(...) end
  3. local function w(...) return write(...) end
  4. local function p(...) return print(...) end
  5. local function tw(...) return term.write(...) end
  6. local function scp(...) return term.setCursorPos(...) end
  7. local function sbc(...) return term.setBackgroundColor(...) end
  8. local function stc(...) return term.setTextColor(...) end
  9. local function tc(...) return term.clear(...) end
  10. local function tcl(...) return term.clearLine() end
  11. local function scb(...) return term.setCursorBlink(...) end
  12. local function ts(...) return term.scroll(...) end
  13. local function r(...) return shell.run(...) end
  14. local function para(...) return parallel.waitForAny(...) end
  15. local function sw(...) return textutils.slowWrite(...) end
  16. local function sp(...) return textutils.slowPrint(...) end
  17. -- ########################## -- Einstellungen -- ############################ --
  18. ghost = "false"
  19. -- ########################################################################### --
  20. resetScreen()
  21. scp(10,2)
  22. w(" Task Manager ")
  23. sbc(16384)
  24. w("X")
  25. sbc(256)
  26. scp(10,3)
  27. w(" ")
  28. scp(10,4)
  29. w(" -LabyOS.exe ")
  30. scp(10,5)
  31. sbc(256)
  32. w(" - ")
  33. scp(10,6)
  34. w(" - ")
  35. scp(10,7)
  36. w(" - ")
  37. scp(10,8)
  38. w(" ")
  39. timeprint1()
  40. scp(10,4)
  41. sbc(256)
  42. w(" -Loading ")
  43. USATime = "00:01"
  44. -- USATime = http.get("http://www.timeapi.org/edt/now?format=%25k:%25M")
  45. -- USATime = USATime.readAll()
  46. scp(10,4)
  47. sbc(256)
  48. w(" -Loading. ")
  49. DETime = "00:01"
  50. -- DETime = http.get("http://www.timeapi.org/cet/now?format=%25k:%25M")
  51. -- DETime = DETime.readAll()
  52. scp(10,4)
  53. sbc(256)
  54. w(" -Loading.. ")
  55. ENTime = "00:01"
  56. -- ENTime = http.get("http://www.timeapi.org/utc/now?format=%25k:%25M")
  57. -- ENTime = ENTime.readAll()
  58. MCTime = "00:00"
  59. scp(10,4)
  60. sbc(256)
  61. w(" -LabyOS.exe [X] ")
  62. scp(12,5)
  63. if closetask1 == 0 then
  64. w(inputrun..".exe")
  65. end
  66. if ENTime == " 0:00" or DETime == " 0:00" or USATime == " 0:00" then -- hmm???
  67. scp(10,5)
  68. sbc(256)
  69. stc(1)
  70. w(" -0:00.exe [X] ")
  71. end
  72. function openmanager1()
  73. while true do
  74.  
  75. scp(24,5)
  76. if closetask1 == 0 then
  77. sbc(256)
  78. w(" [X] ")
  79. end
  80. s(0.1)
  81.  
  82.  
  83. event, button, X, Y = os.pullEvent("mouse_click")
  84. if X >= 8 and X <= 20 and Y == 19 and closetask1 == 0 then
  85. openrun()
  86. openrun2()
  87. end
  88. if X >= 24 and X <= 27 and Y == 5 then
  89. closetask1 = 1
  90. writetask = fs.open("LabyOS/Task/task", "w")
  91. writetask.write([[]])
  92. writetask.close()
  93. scp(10,5)
  94. sbc(256)
  95. w(" - ")
  96. openmanager1()
  97. error("Terminated")
  98. break
  99. end
  100.  
  101.  
  102.  
  103. if X >= 10 and X <= 23 and Y == 5 and closetask1 == 0 then
  104. scp(10,5)
  105. sbc(128)
  106. w(" - [X] ")
  107. scp(12,5)
  108. if closetask1 == 0 then
  109. w(inputrun..".exe")
  110. s(0.2)
  111. openrun()
  112. openrun2()
  113. end
  114. end
  115.  
  116. if X >= 10 and X <= 23 and Y == 4 then
  117. scp(10,4)
  118. sbc(128)
  119. w(" - [X] ")
  120. scp(12,4)
  121. w("LabyOS.exe")
  122. s(0.2)
  123. r("LabyOS/Programme/Desktop")
  124. error("Terminated")
  125. break
  126. end
  127. if X >= 24 and X <= 27 and Y == 4 then
  128. sleep(0.1)
  129. sbc(1)
  130. r("clear")
  131. s(0.1)
  132. sbc(256)
  133. r("clear")
  134. s(0.1)
  135. sbc(128)
  136. r("clear")
  137. s(0.1)
  138. sbc(32768)
  139. r("clear")
  140. s(0.1)
  141. p("Run> LabyOS.exe")
  142. s(0.1)
  143. p("Run> LabyOS/Programs/Desktop")
  144. s(0.1)
  145. p("Run> LabyOS/Programs/Manager")
  146. s(0.1)
  147. p("Run> LabyOS/Programs/Task")
  148. s(0.1)
  149. p("Run> LabyOS/Programs/Run")
  150. s(0.1)
  151. p("Run> LabyOS/Programs/Terminal")
  152. s(0.1)
  153. p("Run> LabyOS/Programs/Explorer")
  154. s(0.1)
  155. p("Run> LabyOS/Programs/Browser")
  156. s(0.1)
  157. p("Run> LabyOS/Programs/Documents")
  158. sbc(32768)
  159. r("clear")
  160. s(0.1)
  161. sbc(128)
  162. r("clear")
  163. s(0.1)
  164. sbc(256)
  165. r("clear")
  166. s(0.1)
  167. sbc(1)
  168. r("clear")
  169. s(0.1)
  170. if fs.exists("startup") then
  171. fs.makeDir("LabyOS/Backup")
  172. if fs.exists("LabyOS/Backup/startup") then
  173. fs.delete("LabyOS/Backup/startup")
  174. end
  175. fs.copy("startup", "LabyOS/Backup/startup")
  176. if fs.exists("LabyOS/Programme/Desktop") then
  177. fs.delete("startup")
  178. fs.copy("LabyOS/Programme/Desktop", "startup")
  179. os.reboot()
  180. end
  181. else
  182. r("clear")
  183. error("startup is not exists")
  184. end
  185.  
  186.  
  187. end
  188.  
  189.  
  190.  
  191. if X >= 28 and X <= 28 and Y == 2 then
  192. stc(1)
  193. resetDesktop()
  194. error("Terminated")
  195. end
  196. if X >= 1 and X <= 6 and Y == 19 then
  197. startmenu()
  198. error("Terminated")
  199. end
  200.  
  201. -- ### hmm?
  202.  
  203. if ENTime == " 0:00" or DETime == " 0:00" or USATime == " 0:00" then -- hmm???
  204. if X >= 10 and X <= 23 and Y == 5 then
  205. image = paintutils.loadImage("LabyOS/Texture/bin/File")
  206. paintutils.drawImage(image, 43, 11)
  207. ghost = "true"
  208. end
  209.  
  210. if X >= 42 and X <= 51 and Y >= 11 and Y <= 18 and ghost == "true" then -- hmm???
  211. r("LabyOS/Texture/bin/Folder")
  212. error("Terminated")
  213. break
  214. end
  215. end
  216. end
  217. end
  218. openmanager1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement