In my experience, capturing the shutDownRequest on a Mac is not reliable. For me it works most of the time, but then it gets me about 1 time out of ten. I've implemented the AppleEvent solution (thanks to Ken Ray) and that has been 100% reliable.

Marty Knapp
Couldn't he just capture shutDownRequest?

on shutDownRequest
   cleanUpStuff
end shutDownRequest

on cleanUpStuff
  # do all your special quit things here
  quit # actually quits when you're done saving or changing or whatever
end cleanUpStuff

or...

on cleanUpStuff
  # do all your special quit things here
pass shutDownRequest # let's Rev handle the shutDownRequest and quit as it normally would
end cleanUpStuff



Hi Peter,

I'm not sure about Problem 2 but regarding Problem 1, you need to trap an AppleEvent in order for a standalone to perform some activities before quitting. For example, put this script in your main stack script and when theClass = "aevt" and theID = "quit", you can successfully trap the program before it quits. eg.

on appleEvent theClass,theID
  if theClass = "aevt" and theID = "quit" then
    -- do something
    quit
  end if
end appleEvent

Best Regards,

Mike



_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to