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

Multiple Page Printing Program!

Started by stevowevo77, 18 March 2013 - 11:58 PM
stevowevo77 #1
Posted 19 March 2013 - 12:58 AM
Hey, Recently i have started working on a printer program, a close friend and i are working on a computer craft university server, and we need to be able to print multiple sheets the same, without having to CTRL + Print Everytime! So i started working on this program! I Have gotten everything running apart from one problem, when i use the printer.write(variable), the users input which is text = read() if its longer than the screen, when it prints it out, the text is going off the page. Is there any way to fix this?

Thanks :)/>
Lyqyd #2
Posted 19 March 2013 - 03:45 AM
Split into new topic.

Please provide your code and any error message(s) you are seeing.
theoriginalbit #3
Posted 19 March 2013 - 03:57 AM
Someone can correct me if I'm wrong, but iirc unlike the terminal the content is no wrapped when printing, so it will not move onto the next line until it gets a \n character. This means you will have to make your own text wrap function. (note you can get the pages size so you know the width)
immibis #4
Posted 19 March 2013 - 01:37 PM
Text isn't wrapped with term.write or monitor.write either.
theoriginalbit #5
Posted 19 March 2013 - 01:58 PM
Text isn't wrapped with term.write or monitor.write either.
write and print are wrapped, and they are the common ones people use
PixelToast #6
Posted 19 March 2013 - 02:27 PM
write is wrapped and print uses write
i NEVER use write for GUIS because it can glitch out if you try to write something outside the screen