Check the docs for 'stopMovie'
Yes, I am looking at that one. But isn't that script activated each time a .dir movie is exited, even if it opens a different .dir movie? Or, is it only activated when the 'PROJECTOR stops?
The script I want to run should only run when you exit the projector.
You're right - it executes every/any time a movie finishes, for example if you navigate to a different file. I have no idea how your file/s and navigation are structured, but perhaps you need to use the 'closeRequest' handler.
perhaps you disable all the close events like "ESC" etc., also disable the close box. then create your own "exit"-button. With that you can execute every script you want.