View Single Post
  #2  
Old 08-11-2014, 10:10 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hello bigkid123,

It's a little difficult to tell what your inquiries actually are.

Let me address this last problem first.

Quote:
I also have an issue of when it writes the SessionName into the .txt file it includes the folders with the Session name and not sure how to only show the Session name.
Are you referring to these lines of the script?

Code:
Set file = fso.OpenTextFile("c:\scrt.config\%S.txt", ForAppending, True)

...

file.Write strSessionName & vbCrLf

If so, the session name is being set to the full path per this line:

Code:
strSessionName = crt.Session.Path

Using the GetOption method available to the SessionConfiguration object is probably a better way to get just the session name.

SecureCRT's help file topic Scripting / Script Objects Reference contains explanations (and often examples) of all the object, methods and properties available in SecureCRT.

Another good resource (for just VBScript and SecureCRT in general) is the scripting manual (which may be where you already got the information on Get).


Quote:
I have modified this one but not quite sure of how to get it to execute in tabs that are already connected to my servers.
I am not quite sure what "this one" is. What was your starting point? One of our example scripts?

To iterate over sessions already opened in tabs, see the GetTabCount() method available to the Application object. You will probably need several of those other methods as well (GetActiveTab(), GetScriptTab(), etc.)
__________________
Thanks,
--Brenda

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