This will only work if a get is on the screen at the time. If a menu is on
the screen and no gets it will not work. If so, you would have to modify
your menu code also.
Alvin Carter
Birmingham, Alabama
nojimb...@intergate.com wrote in message
<365e2c18...@news.intergate.com>...
>I'm looking for a way of ending program execution if a user is
>inactive for a certain period of time. Any advice???
>
>You could edit your GETSYS.PRG that came with clipper and search in the
>source code for INKEY(0) and change it to another value followed by a "CLOSE
>ALL" and "QUIT". Then compile and link into your program to replace the one
>that comes with CLIPPER.LIB. The maximum value of INKEY is 386 which is
>6.44 minutes. The ideal way is to set a timer in your GETSYS.PRG if you
>want to give your user more than 6.44 minutes before timing out.
>
You are confusing the _return_ value of inkey() (IOW, the keypress
value) & the seconds parameter inkey() takes, which can be huge. The
NG doesn't state the maximum, but it's probably in the millions(?).
>This will only work if a get is on the screen at the time. If a menu is on
>the screen and no gets it will not work. If so, you would have to modify
>your menu code also.
>
>Alvin Carter
>Birmingham, Alabama
>
>nojimb...@intergate.com wrote in message
><365e2c18...@news.intergate.com>...
>>I'm looking for a way of ending program execution if a user is
>>inactive for a certain period of time. Any advice???
>>
>
>
--
Nick Ramsay
WitzEnd Computer Services
mailto: ni...@witzend-uk.com
>I'm looking for a way of ending program execution if a user is
>inactive for a certain period of time. Any advice???
If you have Clipper Tools, you can use this near the top of your main
module:
// This sets the nKeyValue to the logout function.
setkey( nKeyValue, { || logoutfunc() } )
// if there is no keyboard activity for nTimeOut seconds, trigger the
// nKeyValue in the keyboard buffer. Normal keyboard activity will
// reset the countdown timer on each keystroke.
keysec( nKeyValue, nTimeOut, -1, .t. )
--
Phil Barnett mailto:phi...@iag.net <-- Remove the first .
Oasis WWW http://www.iag.net/~philb/
FTP Site ftp://ftp.iag.net/pub/clipper
Clipper FAQ http://www.iag.net/~philb/clipper.html
Each of us define ourselves each day by the choices that we make.
Dr. Norman Vincent Peale