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

DiskLabeler, no anvil required.

Started by Ugion, 16 July 2014 - 06:44 AM
Ugion #1
Posted 16 July 2014 - 08:44 AM
I was playing with a friend and messing around with computercraft, we were using anvils to label our disks, and having not used lua in a long time, i decided to start with something simple after some debugging and googling i had it working, and later changed it over to arguments instead of read().

Usage:

disklabeler (orientation) (label)

(remove the parenthesis)

Installation:

pastebin get 7E4hu7YP disklabeler
Edited on 17 July 2014 - 07:05 AM
Saldor010 #2
Posted 16 July 2014 - 08:43 PM
can't you do the same thing (and save you 2 seconds) by using the "label" program?
wilcomega #3
Posted 16 July 2014 - 09:52 PM
can't you do the same thing (and save you 2 seconds) by using the "label" program?
true
Ugion #4
Posted 17 July 2014 - 09:07 AM
can't you do the same thing (and save you 2 seconds) by using the "label" program?
This was meant to be a program to get me back in the groove after a lot of time away from lua. It doesn't make work more simple or anything like that.
Saldor010 #5
Posted 17 July 2014 - 04:13 PM
can't you do the same thing (and save you 2 seconds) by using the "label" program?
This was meant to be a program to get me back in the groove after a lot of time away from lua. It doesn't make work more simple or anything like that.

Well, if it was mostly just for practice. ;)/>
Geforce Fan #6
Posted 04 August 2014 - 04:02 AM
can't you do the same thing (and save you 2 seconds) by using the "label" program?
This was meant to be a program to get me back in the groove after a lot of time away from lua. It doesn't make work more simple or anything like that.
you don't have to release every program, you know.
secret6timb1 #7
Posted 09 August 2014 - 12:51 AM
label set disk disknamehere <— something like that

don't even need lua.
Edited on 08 August 2014 - 10:52 PM
TheOddByte #8
Posted 13 August 2014 - 10:47 PM
I must just say this, your indentation is horrible O.O
Read thisUsually people indent like this, and as you see I use 4 spaces, some people use 2 etc.

if <condition> then
    while <condition> do
        if <condition> then
            -- stuff
        elseif
            -- some other stuff
        else
            -- and some other stuff
        end
    end
end
Now you didn't even need indent your code since it didn't even have any loops/statement, so sorry if I sounded harsh, but it just seemed so strange when I looked at the pastebin link

And here's a suggestion, you should add so that it checks if the one who uses it has entered all arguments needed
RickiHN #9
Posted 16 August 2014 - 05:43 PM
label set disk disknamehere <— something like that

don't even need lua.

That would actually just name the computer "disk disknamehere".
You would have to run the disk.setLabel() to label disks to the best of my knowledge. For that reason I actually wrote a similar program when I had to label a lot of disks to make it all easier:

http://pastebin.com/XCsgdpJk

It will automatically detect any adjacent disk drives, so just run it as "programname disklabel".
Win7yes #10
Posted 16 August 2014 - 06:41 PM
label set disk "This Is The Name"
Let me explain it slowly:
label(Program wich is ran) set(Argument used to set the label) disk(If this is the name of a disk drive, it will use the disk drive and label the floppy in it) Asdfg(Name. If it has spaces it can be enclosed in quotes ("Name asdasda"))
RickiHN #11
Posted 16 August 2014 - 06:54 PM
label set disk "This Is The Name"
Let me explain it slowly:
label(Program wich is ran) set(Argument used to set the label) disk(If this is the name of a disk drive, it will use the disk drive and label the floppy in it) Asdfg(Name. If it has spaces it can be enclosed in quotes ("Name asdasda"))

Ahh right the "disk" is not not an argument for the label program, but in fact the direction/network address of the Disk Drive.