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
  #1  
Old 05-15-2013, 10: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:
Code:
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)
	
	'crt.Session.Disconnect
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
 


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 06:36 AM.