Click here to Skip to main content
12,397,805 members (55,377 online)
Rate this:
Please Sign up or sign in to vote.
See more: VBScript reflection
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 10-Jun-12 15:34pm

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 10 Jun 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100