Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-05-2019, 07:00 AM
kammmo kammmo is offline
Registered User
 
Join Date: Sep 2019
Posts: 4
Lightbulb WaitForStrings as regular expresions

Hello there,

i am looking on the console output in a loop

Code:
vWaitFors = Array(":&>", _
 "#", _
 "@", _
 ">")

Do
	If crt.Screen.WaitForStrings(vWaitFors) Then
		
		Set objTab = crt.GetScriptTab() 
		nRow = objTab.Screen.CurrentRow
		szPrompt = objTab.screen.Get(nRow, 0, nRow, objTab.Screen.CurrentColumn - 1)
		

		
		If reNhop.Test(szPrompt) = True Then
problem is that in case that i list maybe 500 lines, and in each the script will recognize something from the vWaitFors, output is displaying pretty slowly on the screen (CPU going around 35%).

Is there any way to check not basic strings (like "#" for example), but regular expression (like "^(\w+)#" - enable mode on cisco) ??

Many thank for replies
Reply With Quote
 

Tags
cisco , regular expression , waitforstrings


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:49 PM.