I have a very simple application with a form, a richedit and a menu. I'm trying to automatically save the text on the richedit and perform other tasks but only when the application is idle - when the user is not writing or the app loses focus or whatever.
I tried creating an OnIdle
event handler from a gazillion sample codes found on the internet, but it does the opposite, it activates when I am using the app. This link is an example.
I also tred with a timer and check when was the last time the user wrote to the richedit, but I rather not use a timer if possible.
Anyone knows how to detect that an application is idle and run some code when it is? I'm using delphi 7.