Automatic application termination

Automatic application termination

Postby cdmmaui » Wed Feb 20, 2008 6:10 pm

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,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby James Bott » Wed Feb 20, 2008 6:25 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Silvio » Wed Feb 20, 2008 11:46 pm

I hope I can help you ....

Code: Select all  Expand view

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


Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests