Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-24-2016, 08:54 AM
ShawnVW ShawnVW is offline
Registered User
 
Join Date: May 2016
Posts: 15
How to write to Address Bar

Is it possible to print a string to the Address bar, the way you can to the Status bar?
Reply With Quote
  #2  
Old 05-24-2016, 04:11 PM
jjh jjh is offline
VanDyke Customer Support
 
Join Date: Feb 2004
Posts: 815
Hi ShawnVW.

Can you clarify what you mean by the address bar?

What problem are you trying to solve?

Thanks

JJH
Reply With Quote
  #3  
Old 05-25-2016, 09:44 AM
ShawnVW ShawnVW is offline
Registered User
 
Join Date: May 2016
Posts: 15
Currently I'm using the Status Bar as a kind of debugging tool by displaying things like the record currently being processed. I'd like to have more than one place to display such information.

I know that SecureCRT has an "AddressBar" item. I assume this refers to the bar above the Menu Bar, which currently says "OurRemoteProgram - SecureCRT".
Reply With Quote
  #4  
Old 05-25-2016, 10:13 AM
rcomito rcomito is offline
Registered User
 
Join Date: Jul 2010
Posts: 15
Hi Shawn - The bar below the menu items can be written to with:

Code:
crt.Window.Caption =
followed by any valid string.

Rick Comito
Reply With Quote
  #5  
Old 05-25-2016, 10:50 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
The area of the Window that usually reads "not connected - SecureCRT" when SecureCRT is first launched is called the "title bar".

It can be changed by using the crt.Window.Caption property as mentioned.

In addition, each tab's label/caption can be changed by using its corresponding Tab object's Caption property as well.

For example, this code will prepend an index to each tab label in your SecureCRT window:
Code:
For i = 1 to crt.GetTabCount
    strPrefix = "[" & i & "] "
    Set objTab = crt.GetTab(i)
    If Left(objTab.Caption, Len(strPrefix)) <> strPrefix Then
        objTab.Caption = strPrefix & objTab.Caption
    End If
Next
Note also, however, that setting a tab's caption also affects the SecureCRT Title bar (which reflects the caption of the active tab).

Does this information help to answer your questions?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #6  
Old 05-25-2016, 05:42 PM
ShawnVW ShawnVW is offline
Registered User
 
Join Date: May 2016
Posts: 15
Quote:
Originally Posted by jdev View Post

Does this information help to answer your questions?
Well I don't know how to get tabs in my windows, but other than that, yes! Thanks to you both!
Reply With Quote
  #7  
Old 05-26-2016, 09:26 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
Current versions of SecureCRT support opening multiple connections in tabs within the same SecureCRT window.

To open a new connection in a tab, simply enable the Open in a tab option on the Quick Connect/Connect dialog or right-click in the Session Manager and choose Open Sessions in a Tab/Tile.

If you want to open a new connection into a new tab from within a script, you simply use the crt.Session.ConnectInTab() method. You can find out more about this method by consulting the SecureCRT help (main "Help" pull-down menu in SecureCRT, then "Help Topics") and also by reading the SecureCRT Scripting Guide.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Reply

Tags
vbscript

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 01:35 PM.