Jump to content




How to make a reject message for cntrl + "T"


  • You cannot reply to this topic
2 replies to this topic

#1 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 17 December 2012 - 06:11 AM

I am trying to figure out how to make a message that pops up at anytime when someone trys to terminate the program using the CTRL + T keys.
How would I do that?

#2 Alekso56

  • Members
  • 62 posts

Posted 17 December 2012 - 06:18 AM

Like this:



function os.pullEvent()
local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
if event == "terminate" then
print ("Sorry Ctrl+t is disabled")
sleep(2)
end
return event, p1, p2, p3, p4, p5
end

#3 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 17 December 2012 - 06:46 AM

Thanks that works just nicely. :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users