This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
trey2k's profile picture

Easier Pastebin Download Aka Downloader+

Started by trey2k, 07 November 2013 - 01:07 AM
trey2k #1
Posted 07 November 2013 - 02:07 AM
downloader+ is to just make it easier and faster to download software off of pastebin

i will allow it to be used and modified anywhere just give me credit… thank you!


on the computer type: pastebin get TsC2hfLj
--[[
you may use this however you want just give me credit...
~Trey2k
]]--
function returnColor()
if term.isColor() then
term.setBackgroundColor(colors.black)
clear()
end
end
function clear()
term.clear()
term.setCursorPos(1,1)
end
if term.isColor() then
term.setBackgroundColor(colors.blue)
end
clear()
if term.isColor() then
term.setTextColor(colors.white)
end
textutils.slowPrint("Thank you for using Downloader+!!!")
textutils.slowPrint("By Trey2k!!!")
sleep(1)
clear()
write("Pastebin code: ")
input = read()
if input=="" or input==" " then
returnColor()
error("Invalid Code!")
end
clear()
write("What would you like to name it: ")
input2 = read()
if input2==""  or input2==" " then
returnColor()
error("Invalid Name!")
end
clear()
returnColor()
shell.run("pastebin get",input,input2)
Edited on 07 November 2013 - 01:17 AM
jay5476 #2
Posted 07 November 2013 - 03:38 AM
hmm just saying it basically does this with clearing and writing

shell.run("pastebin","get",read(),read())
there is no need for the error checking since in the pastebin code it returns the sucsess result
Edited on 07 November 2013 - 02:39 AM
trey2k #3
Posted 07 November 2013 - 05:40 PM
hmm just saying it basically does this with clearing and writing

shell.run("pastebin","get",read(),read())
there is no need for the error checking since in the pastebin code it returns the sucsess result
yeah ik i just did that so it didn't print the usage… but i can change that