View Single Post
  #3  
Old 05-10-2013, 02:10 PM
rdrovdahl rdrovdahl is offline
Registered User
 
Join Date: May 2013
Posts: 3
Thanks for the reply!

Great to know that variables can be used with these commands. I took your suggestion and made a new variable named strPrompt as follows:

strPrompt = currentdevice + "#"


I then used the strPrompt variable with the WaitForString command:

crt.Screen.WaitForString(strPrompt)


The script was still not recognizing the strPrompt so I put in the following as a test to see what strPrompt was being defined as.

crt.Screen.Send("! strPrompt = " + strPrompt)


Here's the output in SecureCRT:

router1#! strPrompt = router1
router1##



What's interesting is that there is a carriage return between 'currentdevice' variable and '#'. I'm guessing this is what has been giving me trouble all along. Do you know how to reformat a variable to strip out the carriage return?

Thanks again!
Reply With Quote