12-10-2022, 06:08 AM
I've found _EXIT is one of the few commands that I'll put in an ON TIMER sub or event. That way, no matter what my program is doing, every .05 second or so, it checks very fast for an _EXIT event.
What's the main purpose of an _EXIT routine??
To make certain you save any data before the program closes!
Say you've created an enhanced clone of notepad. You spend 8 hours writing the great American novel in it. You sneeze, accidentally clicking the bright red ❌ in the top right corner. AHHHHHHHHHH!! All that work just.... gone...
/cry
I bet you now wished you'd taken time to write a little routine to dump your file to disk before shutting down and closing!
THAT is what _EXIT works perfectly for!!
IF _EXIT THEN
BackUpMyJunk
System
END IF
What's the main purpose of an _EXIT routine??
To make certain you save any data before the program closes!
Say you've created an enhanced clone of notepad. You spend 8 hours writing the great American novel in it. You sneeze, accidentally clicking the bright red ❌ in the top right corner. AHHHHHHHHHH!! All that work just.... gone...
/cry
I bet you now wished you'd taken time to write a little routine to dump your file to disk before shutting down and closing!
THAT is what _EXIT works perfectly for!!
IF _EXIT THEN
BackUpMyJunk
System
END IF