Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Old 01-10-2017, 08:35 AM
tpaolillo tpaolillo is offline
Registered User
Join Date: Jan 2017
Posts: 10
Simple Script Example

Hi, I'm looking to do a telnet script that when runs it prompts you for a IP address then port number. Then when entered it automatically runs a telnet command and displays it on the screen.

I don't mind if the port is hardcoded into the script either.

Any help would be appreciated. Thanks
Reply With Quote
Old 01-10-2017, 10:57 AM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,636
Hi Tony,

Do you intend to use VBScript in your scripting efforts?

If so, please review the VBScript manual on our website here.

Information on SecureCRT specific methods, properties and objects are found in the Scripting / Script Objects Reference topic in SecureCRT's Help file.

For example, you can prompt a user for input using crt.Dialog.Prompt:

crt.Dialog.Prompt(message [, title [, default [, isPassword ]]])

strHost = crt.Dialog.Prompt("Enter IP address for connection", "Get IP")
You would then need to connect to the host, which I believe was illustrated for you in another post.

The Send() method, available to the Screen object, is how you can run a command:
crt.Screen.Send "MyCommand" & vbcr

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote

ipaddress , script , telnet

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 02:09 AM.