TIDEDialog and auto Save

Hello,

Because it is easy to lost all source code I would like to add an function to auto save source before to execute it (=when the end user click on "Run F9").
How to handle it because there is no "BeforeExecute" event ?

Best regards,
Fabrice

For now one workaround you could use is set an event handler in TIDEScripter.OnRunningChange event. It will be fired when scripter starts running and then stops.

But note that it will also be fired when event handlers are executed, for example, since the scripter indeed starts running and then stops in those events.
I'm also not sure if you want to save when user starts debugging application instead of just running it. Maybe the best option would be just add low-level hooks to menu options and/or TAction components to get the event at specific points you want to save your project.