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.
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.
On Thu, 26 Nov 1998 23:19:43 -0600, "Alvin Carter"
<al-c...@mindspring.com> wrote: >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
>nojimbeams...@intergate.com wrote in message ><365e2c18.78267...@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: n...@witzend-uk.com
On Fri, 27 Nov 1998 04:40:29 GMT, nojimbeams...@intergate.com wrote: >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.