Home > Archive > Clipper > November 2004 > Auto Terminate Clipper
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Auto Terminate Clipper
|
|
| BENTAP@AOL.COM 2004-11-16, 6:43 pm |
| HI!
Is there a way to automatically 'QUIT' from clipper application if
the keyboard was in-active for more than 60 minutes ?
Thanks
Ben
| |
| Ian Boys 2004-11-16, 6:43 pm |
| If you have Tools III then you can use KeySec with the mode set to true for
reset after a keypress.
Ian Boys
DTE
<BENTAP@AOL.COM> wrote in message
news:5863449.0411081515.5f829164@posting.google.com...
> HI!
>
> Is there a way to automatically 'QUIT' from clipper application if
> the keyboard was in-active for more than 60 minutes ?
>
> Thanks
>
> Ben
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Ben,
>Is there a way to automatically 'QUIT' from clipper application if
>the keyboard was in-active for more than 60 minutes ?
In the source\getsys subdirectory of your Clipper install tree you
will find a variety of getsys modifications. One of them can be set to
terminate the read after whatever time you choose. It shouldn't be too
difficult to modify it further to kill the application entirely if
that is what you want to do.
HTH,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| BENTAP@AOL.COM 2004-11-16, 6:43 pm |
| klas.engwall@nospam.please (Klas Engwall) wrote in message news:<4190a50f.62701089@nntpserver.swip.net>...
> Ben,
>
>
> In the source\getsys subdirectory of your Clipper install tree you
> will find a variety of getsys modifications. One of them can be set to
> terminate the read after whatever time you choose. It shouldn't be too
> difficult to modify it further to kill the application entirely if
> that is what you want to do.
>
> HTH,
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
Klas!
I am looking to kill the application from 'Tbrowse' Screen or 'Menu to' ,etc.
not only from inactive Read's.
I think your solution will not do here
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Ben,
>I am looking to kill the application from 'Tbrowse' Screen or 'Menu to' ,etc.
>not only from inactive Read's.
>I think your solution will not do here
Ok, then you need to get inside the event system and build your own
timer. Ian's suggestion sounds like something that could work if you
have Clipper Tools.
Or perhaps you can use FT_OnTick() from the Nanforum Toolkit to call a
function every few clock ticks that saves seconds() and lastkey() and
kills the app if there has been no change in lastkey() in the number
of seconds you specify. I have used FT_OnTick() successfully for
various background tasks althbough not exactly for this purpose. But
it wouldn't be too difficult to write a small test routine.
HTH,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| Ross McKenzie 2004-11-16, 6:43 pm |
| On Wed, 10 Nov 2004 00:26:18 GMT, klas.engwall@nospam.please (Klas
Engwall) wrote:
>Ben,
>
>
>Ok, then you need to get inside the event system and build your own
>timer. Ian's suggestion sounds like something that could work if you
>have Clipper Tools.
>
>Or perhaps you can use FT_OnTick() from the Nanforum Toolkit to call a
>function every few clock ticks that saves seconds() and lastkey() and
>kills the app if there has been no change in lastkey() in the number
>of seconds you specify. I have used FT_OnTick() successfully for
>various background tasks althbough not exactly for this purpose. But
>it wouldn't be too difficult to write a small test routine.
>
>HTH,
>Klas
>
Guys,
In the past I have used Robert Lamping's BGEvents library for similar
tasks....background processing of comports, etc. It would be ideal for
this....and it is free.
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
| |
|
| Hi,
On similar, but slightly different theme - does anyone know of a way to quit
and then restart _THE SAME APP_? e.g. something fairly terminal has
happened and you need to restart the app to clear comms ports, flush buffers
etc.
--
Rob Grattan
R&D Software Pty. Ltd.
| |
|
| BTW - I call this the Brute Force approach to programming....
--
Rob Grattan
R&D Software Pty. Ltd.
| |
| Ross McKenzie 2004-11-16, 6:43 pm |
| On Thu, 11 Nov 2004 08:06:09 +1000, "Rob"
<robGETRIDOFTHIS@ANDTHISrndsoftware.com.au> wrote:
>Hi,
>On similar, but slightly different theme - does anyone know of a way to quit
>and then restart _THE SAME APP_? e.g. something fairly terminal has
>happened and you need to restart the app to clear comms ports, flush buffers
>etc.
>
>--
>Rob Grattan
>R&D Software Pty. Ltd.
>
>
Rob,
Untested in this particular situation, but it should work.
Modify your app to create a dummy text file on startup and to delete
it as part of the correct exit routine. That way this text file will
be present if the app dies. Then start your application via a batch
file that checks for the presence of the text file...like this...
----- cut here-----begin.bat----
Rem routine to restart if dummy.txt found
:Beginning
Yourapp.exe
if exist DUMMY.TXT goto Beginning
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
| |
| Nick Ramsay 2004-11-16, 6:43 pm |
| On Wed, 10 Nov 2004 23:18:12 GMT, NoJunk_valusoft@optushome.com.au
(Ross McKenzie) wrote:
>On Thu, 11 Nov 2004 08:06:09 +1000, "Rob"
><robGETRIDOFTHIS@ANDTHISrndsoftware.com.au> wrote:
>
>
>Rob,
>
>Untested in this particular situation, but it should work.
>
>Modify your app to create a dummy text file on startup and to delete
>it as part of the correct exit routine. That way this text file will
>be present if the app dies. Then start your application via a batch
>file that checks for the presence of the text file...like this...
>
>----- cut here-----begin.bat----
>
>Rem routine to restart if dummy.txt found
>:Beginning
>Yourapp.exe
>if exist DUMMY.TXT goto Beginning
>
Setting an error level would be less messy & also has the benefit of
working cleanly in a networked environment. In your code, insert
ERRORLEVEL(1) in your error handler code before you issue a QUIT &
then you can test for it like this:
:Start
yourapp.exe
if errorlevel 1 goto Start
| |
| Ian Boys 2004-11-16, 6:43 pm |
| If you have Tools III then you can use KeySec with the mode set to true for
reset after a keypress.
Ian Boys
DTE
<BENTAP@AOL.COM> wrote in message
news:5863449.0411081515.5f829164@posting.google.com...
> HI!
>
> Is there a way to automatically 'QUIT' from clipper application if
> the keyboard was in-active for more than 60 minutes ?
>
> Thanks
>
> Ben
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Ben,
>Is there a way to automatically 'QUIT' from clipper application if
>the keyboard was in-active for more than 60 minutes ?
In the source\getsys subdirectory of your Clipper install tree you
will find a variety of getsys modifications. One of them can be set to
terminate the read after whatever time you choose. It shouldn't be too
difficult to modify it further to kill the application entirely if
that is what you want to do.
HTH,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
|
| Hi, Guys,
Thanks for the tips - the prog is started via a batch file now, so should be
easy to adjust it. Thanks again!
--
Rob Grattan
R&D Software Pty. Ltd.
| |
| Ross McKenzie 2004-11-16, 6:43 pm |
| On Thu, 11 Nov 2004 09:47:04 +0000, news@nospam.demon.co.uk (Nick
Ramsay) wrote:
>Setting an error level would be less messy & also has the benefit of
>working cleanly in a networked environment. In your code, insert
>ERRORLEVEL(1) in your error handler code before you issue a QUIT &
>then you can test for it like this:
>
>:Start
>yourapp.exe
>if errorlevel 1 goto Start
>
Yes, Nick, I will "pay" that one.
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
| |
| Turan Fettahoglu 2004-11-16, 6:43 pm |
| > I am looking to kill the application from 'Tbrowse' Screen or 'Menu to'
> ,etc.
> not only from inactive Read's.
My Clipper knowledge is no longer up to date, but your problem can be fixed.
READ:
Have a look into GETSYS.PRG. There is an INKEY(0) somewhere. Every keystroke
in a READ command goes there. Change INKEY(0) to INKEY(1800). This means
"wait 1800 seconds". Then check for a LASTKEY() = 0 afterwards. If LASTKEY()
actually is 0 then no key has been pressed and the 1800 seconds in the
INKEY(1800) were over. In this case, EXIT the loop.
TBrowse:
There ought to be an INKEY(0) somewhere in the TBrowse loop that can be
changed to INKEY(1800) as well. Similar procedure as above.
MENU TO sounds somewhat ancient. Change it to ACHOICE(). Does anybody know
how ACHOICE can be written with a time limit?
HTH
Turan
|
|
|
|
|