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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get procomm to execute a command when data comes across screen

Status
Not open for further replies.

WYREDAWG

Technical User
Feb 1, 2003
70
US
i am fairly new to scripting and i am not sure on how to go about doing what i want to do. Basically i want procomm to execute a command whenever a certain data is output on my terminal session. What would be the best way to do this.
 
or is there a way for me to write a script that executes a simple command every 10 minutes. I want to do this because if my terminal stays idle for 15 minutes i get logged out. as long as i hit enter or anything really it will stay alive. I thought about scheduling but the lowest amount of time was an hour.
 
For your first question, the best way would be to use the when target command to look for a certain string and then call a procedure that uses the transmit command to send the proper command.

As for the second question, here is a script that sends a carriage return every five minutes when nothing has been received from the remote system:

proc main
when quiet 300 call sendit

while 1
yield
endwhile
endproc

proc sendit
transmit "^M"
endproc

 
Neat one, knob.

I've used the rget technique, with a while, in a loop. It may be what he's looking for.

WYREDAWG - what's the syntax of what you're looking for? Is it the same all the time? Is it prefixed with something specific?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top