Event scripts
Event scripts are scripts that run automatically when an event is triggered in InDesign: a document is saved, closed, an image/text/Excel spreadsheet is placed into the document, etc.
To install such a script: copy it into the Adobe InDesign XX\Scripts\startup scripts folder and restart InDesign
To uninstall it: remove it from the Adobe InDesign XX\Scripts\startup scripts folder and restart InDesign
More details on startup scripts folder are here.
These are ‘quick & dirty’ experimental scrips: people asked me to write them and I did so. I don’t promise they would work for you as you want it. Feel free to use them as a starting point, or an example, and adjust them according to your needs.
Open image in Photoshop right after placing
Save versions by Martin Fischer
Remember last user by Kasyan
Warn about documents open on DropBox by Kasyan
See also tips on using events