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
Old 05-19-2017, 08:08 AM
hooknife hooknife is offline
Registered User
Join Date: Mar 2007
Posts: 34
How do impalement a "or" operation?

This seems like it should be easy...

All of the equipment I work on has a "#" or "# " in the prompt when you're fully logged in. I just want my script to use a logical and/or operation and fire off if it sees "#" or "# " in the prompt.

I can get the below script to run if "# " (note the space) exists but it wont run if the prompt is missing the space after the # symbol.

Below is my script.

#$language = "VBScript"
#$interface = "1.0"

crt.Screen.Synchronous = True

' This automatically generated script may need to be
' edited in order to work correctly.

Sub Main
crt.Screen.WaitForString "# "
crt.Screen.Send "term pager 0" & chr(13)
crt.Screen.Send "term length 0" & chr(13)
crt.Screen.Send "show run" & chr(13)
crt.Screen.Send "show start" & chr(13)
crt.Screen.Send "term pager 48" & chr(13)
crt.Screen.Send "ter length 48" & chr(13)
End Sub
Reply With Quote

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 01:37 PM.