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

How Do I Do This! (cc N00b)

Started by Sir_Mr_Bman, 11 October 2013 - 11:20 AM
Sir_Mr_Bman #1
Posted 11 October 2013 - 01:20 PM
So, I want to write an installer for some of the programs I made for people on a server of mine.
I want to be able to download from a pastebin URL, WITHOUT the user having to type pastebin get <url> <save>

I also want it to have some of my own custom messages.
How do I do this?

Thank you for the help!
Sir_Mr_Bman #2
Posted 11 October 2013 - 01:23 PM
On the topic of the installer I have another really nooby question…

How do I copy a value to a file called lets say… "password", then using this file have my startup file read the information from this file, using a string as the password? Also, how can I set the information inside this file (password) from my installer file?

Sorry for the dumb questions, kinda new to LUA
Yevano #3
Posted 11 October 2013 - 03:58 PM
I want to be able to download from a pastebin URL

http://www.computercraft.info/wiki/Http.get

How do I copy a value to a file called lets say… "password", then using this file have my startup file read the information from this file, using a string as the password? Also, how can I set the information inside this file (password) from my installer file?

http://www.computercraft.info/wiki/Fs_(API)

You can use fs.open to obtain a handle to the file and use the handle's write and readAll methods to set and get the password.