1. Yeah, I think it would be reasonable to get a save event in this case however you won't get any. What you get instead is a close one, with a path. Look for keySaving in the close event; if its set to enumYes (which implies the document was saved on close), get the path by keyIn. Note that the path may be either a full path to the file or just a folder, if the the file was saved under the same name. 2. Unfortuantely, there are no 'before' events in Photoshop - you only are informed about what has already happened, so I'm afraid while 1) would allow you to be notified about the fact file was indeed saved, you won't be able to play export at this point. There are different solutions I can think about for this situation, but none of them are perfect. For example, you can inform the user then automatically re-open the file, re-export it and close, but this is a bit clunky and it won't work if the user is closing Photoshop which is, of course, problematic (in fact, due to an ancient bug which I believe still exists in CC, you cannot reliably show third-party GUI on PS shutdown). On the other hand, if your special format is in fact just a (relatively) lightweight metadata, you can cache it in memory while the document is still alive and then you will be able to save it even when the document is closed . None of this is ideal, but at least I am unaware about a better way to deal with saved-on-close documents.
... View more