Click here to Skip to main content
15,880,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
First I am not great at code. I am using VB on Reflections

I am trying to create a generic auto return for all show xxx commands on a router but getting hung up.

There is a host of show commands for various items in the router. All them return anywhere from 2 to 20 pages of data. At the end of each section of info or page you get "Press any key to continue (Q for quit)". So you have to hit return until you get to the end of the data and back to the command prompt which is always a "#".

I can create a macro and make it work, but get hung up trying to get it to auto return to the end of data.

I was trying to use a While command to make it work but it gets hung up.

I am sure this is simple for most of you out there.

So an example is:

With Session

.transmit "show port" & CR

It displays data different for each show command and stops with a (Q for quit).

I need it to auto return (CR) when it sees the Press any key to continue (Q for quit) until it gets to the command prompt of #

Thank you in advance if you can help.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900