carrots084

[Ignore] Custom termination

Jul 27th, 2014
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. os.pullEvent = function( _sFilter )
  2. eventData = {os.pullEventRaw( _sFilter } -- os.pullEventRaw will give us the raw event data and store it in this table
  3. if eventData[1] == "terminate" then -- identify the event and see if its terminate
  4. programName = shell.getRunningProgram()
  5. error("User has terminated the program: "..programName,0)
  6. -- this example changes it to say the text between the quotes and then the name of the program
  7. -- change the code after the 'if' to do whatever you want with the terminate even if its nothing
  8. end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment