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

How to do a pastebin installer?

Started by FHSgames99, 10 February 2016 - 05:25 PM
FHSgames99 #1
Posted 10 February 2016 - 06:25 PM
Hi guys,
I'm FHSgames99 and how i can do a pastebin installer?
Lupus590 #2
Posted 10 February 2016 - 06:34 PM
Look at the code for the pastebin program: https://github.com/Vexatos/ComputerCraft-Programs/blob/master/Main/utils/pastebin.lua
FHSgames99 #3
Posted 10 February 2016 - 06:40 PM
yes , but if I add a progress bar how i can do?
Bomb Bloke #4
Posted 10 February 2016 - 11:44 PM
You wouldn't, really, not if your installer only grabs a single file. The bar would only have two positions: 0% (haven't got the file) and 100% (have got the file).

If you're collecting multiple files, then it's simply a case of drawing the bar inbetween each file you collect. Take the number of files you've got, divide by the number of files you want in total, multiply by the total length of your bar, fill in the resulting number of characters.
Lupus590 #5
Posted 11 February 2016 - 09:57 AM
There are some APIs on the forums which will do a progress bar for you. Use the search function.
FHSgames99 #6
Posted 11 February 2016 - 07:36 PM
OK thanks for help