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

Capture script ?

Status
Not open for further replies.

chief39

Technical User
Aug 4, 2002
14
US
I need procomm to capture the screen text everytime there is a dial in connection. So I need capture to turn on when connection in made and turn off when dissconnected so file will save. I have tryed may scripts but can't seem to get one to turn capture on.
 
You can use something like this in your script:

when $CARRIER call check_carrier

while 1
yield
endwhile

The when command would call the procedure check carrier whenever the value of $CARRIER changes. This procedure would look something like this:

proc check_carrier
if $CARRIER == 1
capture on
elseif $CAPTURE != 0
capture off
exit
endif
endproc

This procedure will open your capture file whenever $CARRIER changes to 1 (indicating an open connection) and will close any open capture file when $CARRIER indicates there is no longer a connection. Hopefully that gives you some ideas to use in your script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top