Savage_Me55iah

Run

Jul 19th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. --Script by Savage_Me55iah of CraftAU.com.au--
  2.  
  3. --Other Savage_Me55iah scripts @ http://pastebin.com/u/Savage_Me55iah
  4.  
  5. --INSTRUCTIONS ON USE--
  6. --Instruction video on http://youtube.com/savagemessiah5
  7.  
  8. --Contact Savage_Me55iah @ CraftAU.com.au or http://www.computercraft.info/forums2/ with suggestions/fixes/bugs
  9.  
  10. local scriptName = "Run"
  11. fileDetail = fileDetail or {}
  12. fileDetail[scriptName] = {["version"] = 0.1, ["pastebin"] = "ZtUrtP3p"}
  13.  
  14. local tArgs = {...}
  15. if tArgs[1] == "update" then
  16.     print("UPDATING") shell.run("pastebin get "..fileDetail[scriptName].pastebin.." "..scriptName.."_update")
  17.     if fs.exists(scriptName.."_update") then fs.remove(shell.getRunningProgram()) fs.copy(scriptName.."_update", shell.getRunningProgram()) fs.remove(scriptName.."_update") print("UPDATE SUCCESS") else print("UPDATE FAILED") end
  18. end
  19.  
  20. -----------------------------------------------------------------------------------------------------------
  21. -- Srcipt --
  22. -----------------------------------------------------------------------------------------------------------
  23.  
  24. -- BACKSLASH WAS MESSING WITH MY SCRIPT EDITOR, I WILL NOT BE JUDGED!
  25. function BS() local result = "\\" return result end
  26.  
  27.  
  28. local functionNum = "0"
  29. local programs = fs.list("Program")
  30.  
  31. for t,u in pairs(programs) do print("running: ".."Program"..BS()..u) shell.run("Program"..BS()..u) end
  32.  
  33. coroutinemanip.create(functionNum)
  34. coroutinemanip.run(functionNum)
Advertisement
Add Comment
Please, Sign In to add comment