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

Trying to create a Scrollable Terminate safe program

Started by Soulgriever, 22 June 2012 - 07:32 AM
Soulgriever #1
Posted 22 June 2012 - 09:32 AM
hi on my server i want players to be able to view a list of items and their worths but i dont wish them to be able to exit out of the program. now printing each an every line would be nice an all. but there is so many items that only a few of them are visable. how would i code it to be able to scroll threw pages but not be able to terminate program
tfoote #2
Posted 22 June 2012 - 02:53 PM
use the os.pullEvent() and make it so that they can use the arrows or the mouse wheel. That way you can have them scroll through pages just like TMI does…
Lyqyd #3
Posted 22 June 2012 - 03:23 PM
Actually, you will need to use os.pullEventRaw(), not os.pullEvent as an above poster erroneously suggests. Alternatively, you could temporarily overwrite os.pullEvent to os.pullEventRaw (which there are MANY other topics and at least one tutorial on), then switch it back after your program has run.