Code Comments
Programming Forum and web based access to our favorite programming groups.HI! Is there a way to automatically 'QUIT' from clipper application if the keyboard was in-active for more than 60 minutes ? Thanks Ben
Post Follow-up to this messageIf 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
Post Follow-up to this messageBen, >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]
Post Follow-up to this messageklas.engwall@nospam.please (Klas Engwall) wrote in message news:<4190a50f.62701089@nntpserv er.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
Post Follow-up to this messageBen, >I am looking to kill the application from 'Tbrowse' Screen or 'Menu to' ,et c. >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]
Post Follow-up to this messageOn 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
Post Follow-up to this messageHi, 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.
Post Follow-up to this messageBTW - I call this the Brute Force approach to programming.... -- Rob Grattan R&D Software Pty. Ltd.
Post Follow-up to this messageOn 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 qui t >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 buffer s >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
Post Follow-up to this messageOn 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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.