Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Timeout?

0 views
Skip to first unread message

Alvin Carter

unread,
Nov 26, 1998, 3:00:00 AM11/26/98
to
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.

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???
>

nojimb...@intergate.com

unread,
Nov 27, 1998, 3:00:00 AM11/27/98
to

Boydek Victor

unread,
Nov 27, 1998, 3:00:00 AM11/27/98
to
Hi!
I solve the similar problem next way:
set key 255 to Night - this is my function
keysec(chr(255),600,-1,.t.) - this is tools function

Nick Ramsay

unread,
Nov 27, 1998, 3:00:00 AM11/27/98
to
On Thu, 26 Nov 1998 23:19:43 -0600, "Alvin Carter"
<al-...@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
>
>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


Phil Barnett

unread,
Nov 27, 1998, 3:00:00 AM11/27/98
to
On Fri, 27 Nov 1998 04:40:29 GMT, nojimb...@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.

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

0 new messages