Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-26-2013, 06:25 AM
JDP JDP is offline
Registered User
 
Join Date: Apr 2013
Posts: 5
Easy one

Hello all,

We use CRT 2.3 (32 bit) in our manufacturing environment. Since we will soon be moving our terminal server environment to Server 2008 R2, we are evaluating SecureCRT for our uses. I was trying to get our scripts that we use with CRT 2.3 to work with SecureCRT, specifically the log in script we use for getting into clear orbit. The log in script is a .csf file that says:

expect( "ogin: ");
send( "xxxxxxx\r" );

expect( "assword: " );
send( "xxxxx\r" );

expect( "sername: ");
send( "xxxxx\r" );

expect( "assword: " );
send( "xxxxx\r" );

expect( "rgCode [xyz]:" );
send( "bleh\r1\r16\r" );

Pretty simple right? Except when I ask secureCRT to run it I get a "Unable to teterminte script entine from file extension and no '$language' script header found." message. My guess is that its looking for this to be scripted in VBscript?

As you can tell by now, I know little to NOTHING about scripting, hence my attempt to seek help and knowledge. Let me know if there is any more knowledge or information I can provide, even if you can point me down the right path.
Reply With Quote
  #2  
Old 04-26-2013, 07:41 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi JDP,

Thanks for the question and interest in SecureCRT. Since SecureCRT 3.0, ActiveX scripting engines are supported. This allows one to use a favorite scripting language as long as there is an ActiveX scripting engine available for the language.

Your script is simple enough to convert to VBScript. You can find a manual that illustrates how to use the SecureCRT scripting API in conjunction with VBScript at the following location:
http://www.vandyke.com/support/tips/...ing/index.html
Chapters 4 and 5 are probably going to be most helpful to you since they deal with reading data from and sending data to a remote device.

The specific methods you will use are WaitForString() and Send(). They are included in the Screen object.

For example:
Code:
crt.Screen.Synchronous = True
crt.Screen.WaitForString "ogin: "
crt.Screen.Send "xxxxxx" & vbcr
The above is how you would convert the first two lines of your CRT 2.3 script. The Synchronous property (also part of the Screen object) is covered in the scripting manual, but briefly, it is what tells SecureCRT to allow the WaitForString() method to actually look at the data that is sent from the remote device to see if a match is found.

You don't need a script header if you use a file extension of ".vbs" for your script file.

Does this help you convert your CRT 2.3 scripts to VBScript for use in SecureCRT 7.0.4?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 04-26-2013, 07:45 AM
JDP JDP is offline
Registered User
 
Join Date: Apr 2013
Posts: 5
I'll certainly take a look at this in the next few days, (today is turning into one of THOSE days as far as support and time). I think this should get me going in the right direction to at least get the log in working. Thanks for the prompt reply, I'll post any problems I run into in this thread.
Reply With Quote
  #4  
Old 04-26-2013, 07:57 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Sounds good JDP. I am happy to help with any questions that arise.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 05-01-2013, 11:50 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi JDP,

It was brought to my attention that we have another solution that might help you in your effort to convert your scripts. If you would like more information, please send a message to support@vandyke.com with a subject of Attn: Todd - Forum thread 10999.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


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