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

Insert a program into your game?

Started by Edman, 07 October 2012 - 08:24 PM
Edman #1
Posted 07 October 2012 - 10:24 PM
Say I wanted to insert a program in, but I dont feel like typing it line for line, how would I do this?
sjele #2
Posted 07 October 2012 - 10:26 PM
Pastebin api or a somesort of macro
Edman #3
Posted 07 October 2012 - 10:28 PM
Pastebin api or a somesort of macro
What is a pastebin api?
jag #4
Posted 07 October 2012 - 11:18 PM
If you post something on pastebin and then in-game on a computer/turtle do

pastebin get [pasteID] [program]
(this requires http to be active in the config)
[pasteID] = the pastebin id
[program] = the name that the program will get once downloaded

Images:
Spoiler


You can see that in the address bar it stands
pastebin.com/LQttg1h4
And so LQttg1h4 is the [pasteID]

For example:

pastebin get LGttg1h4 hello
This will create a file on your (ComputerCraft) computer with the name of hello.
And so if you run the program it will print Hello!