Hi all.
I am making a program that gives a brief tutorial on how to use my very basic API.. How can I make my program stop printing lines on the screen when it is near the bottom, and wait for a keypress before printing another line? Thanks for any help.
Need help with making use of "Press any button to continue"
Started by MatazaNz, Jun 23 2013 04:02 AM
6 replies to this topic
#1
Posted 23 June 2013 - 04:02 AM
#2
Posted 23 June 2013 - 04:13 AM
textutils.pagedPrint is the easiest way. Give it a string and it will print it, if/when the text reaches the bottom it will wait for a key press before scrolling.
#3
Posted 23 June 2013 - 04:15 AM
Wow, that easy? Thank you friend, you have saved me a lot of time and brain-thrashing
#4
Posted 23 June 2013 - 06:04 AM
Indeed it is that easy
no problems.
#5
Posted 23 June 2013 - 10:29 PM
You could also use event = os.pullEvent("char")
#6
Posted 24 June 2013 - 05:23 AM
johnnic, on 23 June 2013 - 10:29 PM, said:
You could also use event = os.pullEvent("char")
os.pullEvent("key")
Also that means that you must write your own handler that writes as much text as it can and then wait for key press, then print the next, and then wait, and then print, wait, print, wait, print, over and over until it is all printed.... Why do that when you can just call a pre-made function that does it for you.
#7
Posted 24 June 2013 - 08:14 AM
theoriginalbit, on 24 June 2013 - 05:23 AM, said:
johnnic, on 23 June 2013 - 10:29 PM, said:
You could also use event = os.pullEvent("char")
os.pullEvent("key")
Also that means that you must write your own handler that writes as much text as it can and then wait for key press, then print the next, and then wait, and then print, wait, print, wait, print, over and over until it is all printed.... Why do that when you can just call a pre-made function that does it for you.
Didn't think of that.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











