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-15-2013, 11:41 AM
gunslingor gunslingor is offline
Registered User
Join Date: May 2013
Posts: 27
Chapter 3: Connecting to Remote Machines

I learned a lot from this chapter, but the one method I want to use isn't listed there, so I'm wondering if it (or something like it) is even possible.

Here's my slowly evolving simple first script:
Sub Main()
	'Run "C:\Program Files\VanDyke Software\SecureCRT\SecureCRT.exe"
	crt.Session.Connect "/Serial COM6 /BAUD 9600"
	crt.Screen.Send chr(13)
	crt.Screen.WaitForString "username:"
	crt.screen.send  "Myusername"
	crt.screen.send chr(13)
End sub
so I'd like the first thing to happen to be a message box or similar asking if the user wants serial or ssh connection... assuming serial, the above connect statement would run, assuming SSH what I want to happen is for the connect dialog to pop up with all my predefined sessions... when a user selects the session they want execution is passed back to the script which then runs a similar connect statement for SSH.

Is there underlined text above even possible? Is there a way to emulate it if not? I might be making this more complicated than it needs to be... perhaps I should just connect manually, then run the script that is intended to only capture and parse data using, primilary, show commands that will later be imported into a DB.
Reply With Quote

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 05:36 PM.