Page 1 of 1
Automatic application termination
Posted: Wed Feb 20, 2008 6:10 pm
by cdmmaui
Hello, does anyone have a sample function that will automatically terminates an application if a user is not actively using the application. I need this function to automatically close the application in case a user forgets to close application at end of day so we can run of an automatic index routine. Thank you in advance for your help.
Regards,
Posted: Wed Feb 20, 2008 6:25 pm
by James Bott
Darrell,
Here is an idea. Create a timer that checks the time of day every 30 mintues or so then if it is after a specified time, call wndMain():end().
James
Posted: Wed Feb 20, 2008 11:46 pm
by Silvio
I hope I can help you ....
Code: Select all
Local oOut
Local nTime:=0
Local oWnd
define window oWnd
....
DEFINE TIMER oOut INTERVAL 60000 OF oWnd ;
ACTION ( nTime ++, if ( nTime == 1,( MsgInfo( OemToAnsi("Version 1.0 ( Demostration )." + CRLF +;
"Author" + CRLF + "name_application" + CRLF +"End of demostration") ),oWnd:END()),))
ACTIVATE TIMER oOut
ACTIVATE WINDOW oWnd