View Single Post
Old 09-18-2019, 02:04 AM
kammmo kammmo is offline
Registered User
Join Date: Sep 2019
Posts: 4
Hi Brenda,

Version 8.5.3 (x64 build 1867)

script is pretty simple.

I am checking "CurrentRow" of active session. In this row i am checking beginning of the row. I am trying to recognize this string and decide, if i am in enable mode or privilege mode on Cisco device.

Switch> --> enable mode
Switch# --> privilege mode

So the differences is only in one symbol ( > vs # ).

So i am looking on the CurrentRow in a loop, with condition as i wrote

vWaitFors = Array("#", _

If crt.Screen.WaitForStrings(vWaitFors) Then
When one of the symbol is recognized as an output in console, the code inside the "If" is proceed.

This process is pretty slowly when your output has lot of "#" (for example some comments). It is processed on each "#". I wanted to add there regular expression (like "^(\w+)#"). You said the it is not supported now. So i just want to check CurrentRow only each second. I cannot do it in loop as i am checking each "#" all the time.

When i apply "sleep", the console output is not displaying output in real time on the screen, and it is freezed during this 1 second. Output is like blocked in some way. It is not usable.

So is there any way how to check "CurrentRow" in second interval, and do not block output on the screen??

Hopefully i explained it understandable.

Reply With Quote