Jump to content




Program Installer


  • You cannot reply to this topic
4 replies to this topic

#1 PointlessSpike

  • Members
  • 3 posts

Posted 01 August 2015 - 01:58 PM

I've just completed a program that will allow you to download from the internet (assuming HTTP is enabled, of course) a file and then save it. This is meant to be used for programs, but could really be used for anything. It's really simple, and meant so that you only have to write a program once (could even be written on a real world computer and put online).

Obviously, you won't be able to modify the programs on the site this is downloading from, but you can use my ones if you like, although I haven't done anything terribly impressive. You'd probably want your own, and there are sites that do hosting like this for free. You literally just put the file on a server (I've tended to just upload my CC files straight from where they're stored in my save files).

Simple as could be, but a big time saver if you use a lot of computers and programs.

local fileName = ...
local getResponse = http.get("http://www.ccprograms.netne.net/" .. fileName)
local file = fs.open(fileName, "w")
file.write(getResponse.readAll())
file.close()
getResponse.close()


#2 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 01 August 2015 - 04:23 PM

I don't know if you are aware of this, but ComputerCraft has built-in support for pastebin.com, through the program 'pastebin'. Anyway, don't be shy to post such programs, everyone has to start somewhere!

#3 AoD

  • Members
  • 38 posts

Posted 01 August 2015 - 09:37 PM

I like this program its a good idea for a Disk Installer, I'm gonna use it for my Space Development Project I want to Build :), it may be a good Idea to put it on pastebin to allow users to get it into minecraft that way we dont have to create the file and paste the code to run it

Edited by AoD, 02 August 2015 - 03:31 PM.


#4 flaghacker

  • Members
  • 655 posts

Posted 02 August 2015 - 08:04 AM

View PostAoD, on 01 August 2015 - 09:37 PM, said:

I like this program its a good idea for a Disk Installer, I'm gonna use it for my Space Development Project I want to Build :)/>, Pointless it may be a good Idea to put it on pastebin to allow users to get it into minecraft that way we dont have to create the file and paste the code to run it

Or you could post your own code on pastebin and download it using the pastebin program...

#5 AoD

  • Members
  • 38 posts

Posted 02 August 2015 - 03:28 PM

I dont remember typing half of that post lol





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users