Great!
I can't take credit, I'm sure I got it from some website, but I can't
remember where. Glad it worked for you.
Mike
Rafael Copquin wrote:
Works exactly as I wanted
Thank you very much
El 31/10/2014 18:01, Rafael Copquin escribió:
Thank you Mike
I'll try this code.
El 31/10/2014 16:46, Mike Copeland escribió:
Geez, it's one of those days...
Further Clarification...
I call this routine from a timer that fires every minute. If the
lnTimeOut value was 5 minutes (300 seconds) I would probably set the
time to 4 or 5 minutes.
My need is to close out my application if it isn't 'active' because
the workstations are in a retail environment with public access
(smart inquisitive kids.)
Mike
Mike Copeland wrote:
Clarification...
What this does is watch for mouse movement or keyboard input as
reported by the OS.
If, after 60 seconds (with this example) no user activity (mouse,
keyboard) the "lnElapsed < lnTick" is true and you can proceed as
you see fit.
Mike
Mike Copeland wrote:
This is a huge issue for my application. Here's what I use...
DECLARE INTEGER GetTickCount IN kernel32
DECLARE SHORT GetLastInputInfo IN win32API STRING @
Local lcBuf, lnLast, lnTick, lnTimeOut, lnElapsed
lnTimeOut=60 && # of seconds
lcBuf=BinToC(8,'4rs')+BinToC(0,'4rs')
GetLastInputInfo(@lcBuf)
lnLast=CToBin(Substr(lcBuf,5,4),'4rs')
lnTick=GetTickCount()
lnElapsed = lnLast+(lnTimeOut*1000)
If lnElapsed < lnTick
* do what you want here, they're out of time
EndIf
Mike Copeland
Rafael Copquin wrote:
I wonder what is the best way to kick users out of an app when
they have it open for ages without doing anything (the typical
out-to-lunch). The user has a number of files open and does not
do anything for a long time.
I want to have the system shut itself down after 5 or 10 minutes
of inactivity
Suggestions please
Rafael Copquin
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/54541d93.2040...@ggisoft.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.