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

Can't Scroll (Page Up/Page Down) in Computer Console

Started by Xnihil0, 20 May 2016 - 04:34 PM
Xnihil0 #1
Posted 20 May 2016 - 06:34 PM
I'm having trouble getting started with computer craft. I'm try to make CC and AE work together with open peripherals but when I use peripheral.getMethods("back") or help back it gives me a long list of functions but cuts off the top half of the information. In the program editor I can scroll using Page Up and Page Down if I disable NEI, but I can't scroll in the console. Am I missing something or do I need to figure out a workaround to only display half the information at a time?
KingofGamesYami #2
Posted 20 May 2016 - 09:22 PM
The console is not normally scrollable. Your best bet would be to write the data to a file instead of to the screen.

Edit: Elaborating a bit. It'd look like this:


local file = fs.open( "output" )
file.write( textutils.serialize( peripheral.getMethods( "back" ) ) )
file.close()
Edited on 20 May 2016 - 09:27 PM
Dog #3
Posted 20 May 2016 - 09:46 PM
textutils.pagedTabulate(peripheral.getMethods("back")) will give you a manageable list that doesn't scroll back but allows you to scroll forward with the space bar.
Xnihil0 #4
Posted 21 May 2016 - 01:04 AM
Thank you both, Dog's solution solved my problem. I don't yet understand KingofGamesYami's solution but I haven't considered messing with file system stuff yet, so I'm sure I'll learn about it as time goes on and be able to utilize saving the information later.