Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 02-18-2009, 03:49 AM
timRoberson timRoberson is offline
Registered User
Join Date: Feb 2009
Posts: 3
scripted disconnect/connect starting in new tab

I've written a script which, under certain conditions, attempts to disconnect and reconnect the session and continue with the script.

When I run this in multiple tabs, I've found that it works fine in the "active" tab (by that, I mean the currently selected tab), but for tabs in the background, the session does not disconnect, and instead I get a new session starting up in a new tab. This wouldn't be a problem if the script then continued running in the new tab, but it doesn't.

Is there a way to get round this?

I'm using perl as follows:
$crt->Session->Connect("/SSH2 /password <password> <userid>\@<host>","1");

I came across this in v6.1.0, but I've also tried v6.2.0 beta with the same results
Reply With Quote
Old 02-18-2009, 06:38 PM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,524
Hello tim,

You may be able to use the GetScriptTab method to create an object. You can then use that object in place of "crt".

You can find this information in the 'ActiveX Scripting' topic of SecureCRT's help file.

For instance, since we do not have any Perl script examples, in VBscript you can set an object equal to the ScriptTab using the following syntax:
Set ScriptTab = crt.GetScriptTab()
Once you have the ScriptTab object defined in your Perl script, you could change your line of code:
Does this information help you in accomplishing your scripting goal?

VanDyke Software
Technical Support
(505) 332-5730
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 08:43 AM.