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

Stop Your Program Being Terminated

Started by libraryaddict, 20 February 2012 - 03:35 AM
libraryaddict #1
Posted 20 February 2012 - 04:35 AM
I have a Password protection system to unlock my computer
But I know how to stop Ctrl+T terminating my password program as if it didnt exist.

People in IRC suggested os.pullEventRaw()
However I have no idea how to implement it and all my efforts resulted in a computer crash.

Would someone be able to post a script or something which will cancel Ctrl+T?
luza #2
Posted 20 February 2012 - 09:05 AM
you could for example put your password system into another file.
And into the startupsystem you write:
while true do
shell.run("check")  --for "check" you write the name of your passwordsystem file.
end

that would be the simpliest method.

You could also change the os.pullEvent() method but I think in your case it's not necessary.
rockymc #3
Posted 20 February 2012 - 10:42 AM
I guess it's something like


e, p == os.pullEventRaw()
if e == "terminate" then
pcall()
print( "Too bad." )
end
Espen #4
Posted 20 February 2012 - 12:09 PM
There's a thread called "CTRL+T" where this question has already been answered:
http://www.computercraft.info/forums2/index.php?/topic/61-ctrlt