Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to have script look at the length of time connected

Status
Not open for further replies.

M1PBXtech

Technical User
Jan 30, 2003
59
US
Hello

I have a login script I attach to entries in my dialing directory. I recently added the "termreset" command at the front of the script and it works great to clear scroll back and terminal settings from the previous connection.

The problem I have run into is sometimes due to inactivity the equipment I connect to will log me out. It does not disconnect me just logs me out and when this happens I click a meta key that has the LOGI script attached to it to log back in. I would prefer that The screen does not reset in this instance. I know that one obvious answer is to have two login scripts. One with the termreset and one without but it seems like there should be a way I can have the one login script look at the connect time and if connected greater then 1 minute do not termreset. I searched the aspect commands and cannot seem to find anything to help me look at time connected?

Any Ideas?
 
I don't know how to reference the time you've been connected, but how about having your script send some type of 'keep alive' on a routine basis.

That should be pretty easy to do, I think if you search this forum you'll probably find a sample or two.
 
Good idea but a keep alive will not work. I have various scripts I use while I am logged in. A keep alive script would keep the other scripts from running. Guess I will just make a copy of the LOGI script without the term reset in it an map it to the META key. I was just trying to keep things neat by having the one script serve both needs.

Thanks
 
Here is one I use, very simple:

proc main
while 1
waitquiet 18 forever
transmit "^M"
endwhile
endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top