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

[Question] A little question :P

Started by Kadix, 04 May 2013 - 04:21 PM
Kadix #1
Posted 04 May 2013 - 06:21 PM
How can I do a print code that stays forever on the screen? And how can I make it so the person can't do CTRL + T ?

Thanks for the help :D/>
H4X0RZ #2
Posted 04 May 2013 - 06:49 PM
What did you mean with "forever"?

the anti-terminate:

OldPullEvent = os.pullEvent --backup the os.pullEvent
os.pullEventRaw -- override the os.pullEvent
--Put this code at the top of your program

--If you want to disable the anti-terminating, do this:
os.pullEvent = OldPullEvent

I hope It's helpfull for you :)/>/>
Kadix #3
Posted 04 May 2013 - 08:18 PM
Like… It stays with a Hi that won't vanish.
remiX #4
Posted 04 May 2013 - 10:47 PM
What did you mean with "forever"?

the anti-terminate:

OldPullEvent = os.pullEvent --backup the os.pullEvent
os.pullEventRaw -- override the os.pullEvent
--Put this code at the top of your program

--If you want to disable the anti-terminating, do this:
os.pullEvent = OldPullEvent

I hope It's helpfull for you :)/>/>
Second line should be
os.pullEvent = os.pullEventRaw

As for the permanent text, just have it print and if you don't want it to stop and have it so you can type add this to the end:
while true do
    sleep(60)
end