Hello Mark,
Yes, I tested this extensively yesterday, in many scenarios.
It detects non-keyboard and non-mouse movement for the period defined.
It works as desired, I just activated the timer on the main window of the application.
It is activated as soon as the application is executed.
The timer is activated and valid as..
If the application is at the main windows. (Works)
If the application is in any dialog or at a GET. (Works)
If the application is minimized. (Works)
If the user has the application open of any dialog and waiting at a GET and working on a xls worksheet. (Works)
My code is below as the MAIN.PRG
- Code: Select all Expand view RUN
#include "FiveWin.Ch"
// Declare Static Variables
STATIC nWait_Time,cThe_Func,lTime_Cont
*---------------------------------------------------------------------------*
FUNCTION Main( CompPara, YearPara )
*---------------------------------------------------------------------------*
// Assign parameters to variables
nWait_Time := 5400000 // = 90 Minutes // Time to wait until calling function
cThe_Func := "iRtrn:=Exit(.T.)" // Name of the function to be called when Timer time is reached
lTime_Cont := .F. // After executing the function, continue to monitor Keep as .F.
// Define main window and activate..
DEFINE WINDOW oMainWnd TITLE S_Name MENU BuildMenu() ICON oIco MDI
}
} your routines....
}
ACTIVATE WINDOW oMainWnd MAXIMIZED ON INIT ( BuildTimer( oMainWnd ) )
Return( Nil )
*---------------------------------------------------------------------------*
FUNCTION BuildTimer( oDlg )
*---------------------------------------------------------------------------*
TinaTivo():New(nWait_Time,cThe_Func,lTime_Cont) // Add tinativo.lib To MAK File
Return( Nil )
Mark, I do not how to upload the lib or the prg files here on the forum.
If you can share your email address, it can be sent to you.
Regards