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

[MC 1.6.4 / CC 1.57] CCScanner 1.0 - Scan Printed Pages!

Started by Tiin57, 18 October 2013 - 05:26 PM
Tiin57 #1
Posted 18 October 2013 - 07:26 PM
So, it's a pretty simple mod. It adds a scanner peripheral to Computercraft. This peripheral does exactly one thing; it takes printed pages (I'm not sure if books/bundles of pages work yet, and if not they're coming soon) and converts them into data when you call scan() on the peripheral.

Here's the recipe:


Just plonk that thing down.

Methods (scanner is the wrapped peripheral):

data, title, pageCount = scanner.scan()
The return value of scan() is a bit strange.
If there's no paper in the slot, it'll return nil.
title and pageCount are exactly what they look like.
If there is paper in the slot, the method will return a weird table for data.
It looks like this;

{ { line, color }, { line, color } ... } -- And so on and so forth.

Downloads
SpoilerOh, you wanted a download?
Fine.
1.0: http://www.mediafire...scanner-1.0.jar

License:
The code is private.
I don't give a damn what you do with the binary, so long as people know it's my work.

That ought to be all; if I've left anything out, please tell me below!

Please, I can't emphasize enough how important bug reports and feature requests are.
Edited on 16 January 2014 - 06:37 PM
Zudo #2
Posted 19 October 2013 - 03:51 AM
I like this, it is nice and simple. Shame there is no 1.5.2 download, as I would use it in my private mod pack.
theoriginalbit #3
Posted 19 October 2013 - 04:40 AM
I like it. Simple, and something that isn't going to be added into CC on you :P/>

Will test out more thoroughly next chance I get.

One suggestion though, give us a use for all those left over glass panes from crafting a computer, use glass panes. Then while you're at it, have the top of the scanner open when we right-click on it :P/> oh also showing a blank piece of paper on the scanner when there's paper in there would be cool too xD :P/>
gamax92 #4
Posted 19 October 2013 - 10:39 AM
… Then while you're at it, have the top of the scanner open when we right-click on it :P/> oh also showing a blank piece of paper on the scanner when there's paper in there would be cool too xD :P/>

You mean like Orwell's scanner?
Spoiler
Geforce Fan #5
Posted 19 October 2013 - 03:02 PM
Adding this to my private modpack
This could be useful for extremely short programs cause it saves you a floppy disk
awsmazinggenius #6
Posted 28 November 2013 - 07:53 PM
May I ask what happens if you print "Hello " in one color, then reinsert the page into the printer, printer.setCursorPos(7, 1) and then printer.write(" World",) in another color? That puts two colors on one page, like this:
Hello World
How does the output work?
F1repl4ce #7
Posted 05 February 2014 - 08:24 PM
You need to add a mcmod.info file to the jar. Just a heads up.