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

Scanner

Started by HPWebcamAble, 13 March 2015 - 11:48 PM
HPWebcamAble #1
Posted 14 March 2015 - 12:48 AM
This HAS been suggested before, but all three times that I found, the topics ended with "This is a good idea!"

Spoilerhttp://www.computerc...ge__hl__scanner
http://www.computerc...__fromsearch__1
http://www.computerc...__fromsearch__1

And nothing has happened since.

So here is my version of the SCANNER

Crafted a bit like the printer, it has several slots to put paper (or paper that has been crafted together)
Obviously it's a peripheral

If its wrapped as 'scanner'

scanner.newPage() --#> draws a new page into the scanner's 'current slot'

scanner.getPageTitle() --#> returns the name of the current page

scanner.getPageSize() --#> returns the size of the current page

scanner.getTotalPages() --#> returns the number of pages in the booklet (or 1 if its just a single page)

scanner.readAll() --#> Same as with the FS api, it returns the whole page's contense

scanner.readLine() --#> Same as with the FS api, returns a line at a time

scanner.nextPage() --#> goes to the next page of the booklet, returning true if it succeeds, false if you are on the last page already. readLine could do it automatically

scanner.endPage() --#> sends the current page/pages into the output slot

Or even more fun

Use 'scanner.scanPage()' to start scanning, then use os.pullEvent() to listen for scan events, which could be a single letter, word, line, ect…
The bar in the scanner could slowly move across to show its progress


I don't really know how to work color into this. Prehaps there could be a regular scanner and an advanced scanner, like computers/turtles/pda's
The advanced ones might return some kind of data that represents the color, but I'm not sure exactly what that would be

Anywho, I think it would be a really nice addition, since there isn't a way to read printed pages, or regular MC books. (The scanner could work on books too)
Edited on 13 March 2015 - 11:50 PM
theoriginalbit #2
Posted 14 March 2015 - 03:54 AM
It has happened. There have been several Haddon mods that have added a scanner.
HPWebcamAble #3
Posted 14 March 2015 - 05:02 AM
It has happened. There have been several Haddon mods that have added a scanner.

I mean in vanilla CC
MisterSanderson #4
Posted 16 April 2015 - 03:38 AM
I don't really know how to work color into this. Prehaps there could be a regular scanner and an advanced scanner, like computers/turtles/pda's
The advanced ones might return some kind of data that represents the color, but I'm not sure exactly what that would be

It's a good idea having a B/W scanner and a RGB advanced scanner.
CrazedProgrammer #5
Posted 16 April 2015 - 11:49 AM
What a good idea! It would be a good way to make keycards.
HPWebcamAble #6
Posted 16 April 2015 - 11:42 PM
It would be a good way to make keycards.
]

Just one of the many possiblities

I really think that this needs to be added in some form


On that note, anyone know if turtles can get the data from a page?
Edited on 16 April 2015 - 09:42 PM
Anavrins #7
Posted 17 April 2015 - 12:18 PM
It would be a good way to make keycards.
]

Just one of the many possiblities

I really think that this needs to be added in some form


On that note, anyone know if turtles can get the data from a page?
I am sure the text on a page is stored in it's NBT tags.
turtle.inspect, .getItemDetails does not return NBT tags.
Edited on 17 April 2015 - 10:18 AM
ardera #8
Posted 17 April 2015 - 01:25 PM
What a good idea! It would be a good way to make keycards.
You could use floppy's for this too
Dragon53535 #9
Posted 17 April 2015 - 05:55 PM
What a good idea! It would be a good way to make keycards.
You could use floppy's for this too
Not without leaving the computer vulnerable. If you were able to use books or pages as keycards, then you don't have to worry about startup disks.
flaghacker #10
Posted 17 April 2015 - 06:43 PM
What a good idea! It would be a good way to make keycards.
You could use floppy's for this too
Not without leaving the computer vulnerable. If you were able to use books or pages as keycards, then you don't have to worry about startup disks.


You'll always have to keep at least one side of the computer visible so the user can interact with it, and anyone can put a disk drive there himself.
KingofGamesYami #11
Posted 17 April 2015 - 07:03 PM
-snip-
You'll always have to keep at least one side of the computer visible so the user can interact with it, and anyone can put a disk drive there himself.

*ahem* monitors?
flaghacker #12
Posted 17 April 2015 - 07:15 PM
-snip-
You'll always have to keep at least one side of the computer visible so the user can interact with it, and anyone can put a disk drive there himself.

*ahem* monitors?

*ahem* user-friendlyness :P/>? indeed, you could use a monitor.
RolanDecoy #13
Posted 29 May 2015 - 01:11 AM
I would love to see this as well, but for different reasons; Would be great to scan items other than books / pages and get at the very least an item ID from them for a sorting / filter / counter system.
Lyqyd #14
Posted 29 May 2015 - 01:19 AM
Use turtle.inspect or turtle.getItemDetail for that.
RadiationAlert #15
Posted 04 June 2015 - 09:42 PM
I would love for this to be in default CC. Perhaps the crafting recipe would be identical to the printer's but the ink is replaced by an eye of ender?