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

Run Pastebin Programs Directly

Started by Mailmanq!, 06 March 2013 - 11:50 AM
Mailmanq! #1
Posted 06 March 2013 - 12:50 PM
Tired of downloading those programs you will only run once?
Like those 'OS' installers?

WELL WAIT NO MORE!!!!!

With this it you don't actually have to download it.

Just do <programname> <pastebin code> to run a program


pastbin get 4a5SNGnA
SuicidalSTDz #2
Posted 06 March 2013 - 12:54 PM
Why is this a clock pastebin link?
Mailmanq! #3
Posted 06 March 2013 - 12:56 PM
Why is this a clock pastebin link?

Woops that is a test thing I tested the program with for pointing that out.
theoriginalbit #4
Posted 06 March 2013 - 01:02 PM
So basically your code does this

loadstring( ( http.get("http://www.pastebin.com/raw.php?i="..( ... ) ) ).readAll() )()

I would maybe have it show usage if they did not supply an argument. makes it a little nicer.

EDIT: Also checking if http is enabled is always a good idea too

if not http then
  print('http api is not enabled')
  return
end
Mailmanq! #5
Posted 06 March 2013 - 01:05 PM
So basically your code does this

loadstring( ( http.get("http://www.pastebin.com/raw.php?i="..( ... ) ) ).readAll() )()

I would maybe have it show usage if they did not supply an argument. makes it a little nicer.

Okay, sure. I just wrote this in like 3 seconds.
SuicidalSTDz #6
Posted 06 March 2013 - 01:36 PM
Why is this a clock pastebin link?

Woops that is a test thing I tested the program with for pointing that out.
That clock had 409 Hits on pastebin?!

EDIT: People must be getting too lazy or aren't reading the Lua Manual!

EDIT!: My mom just got in an accident… This day is going so well…

The necromancers must be on to me…