#1
|
|||
|
|||
Rearrange tabs
Hi everyone!
The problem I am trying to solve: Sometimes I work with big number of routers and switches and maybe 1-2 connection to other VMs. I want to re-arrange tabs (mainly because R10 is between R1 and R2). Now, I know Python quite well, so it is not a problem for me to implement this logic. However, I am not sure if there exists API call which will set index of the tab to what I want. So does it exist? If not, I would propose to implement either:
|
#2
|
|||
|
|||
Hello Phen,
What version of SecureCRT are you using? Quote:
Are you trying to change the order the sessions appear in the Connect dialog (or Session Manager)? Or after you have connected the sessions in tabs?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Quote:
I am using 7.3.0. I am trying to reorder tabs after I connect to sessions. The quoted statement means that I have tab titles R1, R2, ... R10, R11, ... and R10, R11, ... are after R1 but before R2. Currently I am moving them manually, but I wanted to write a script and bind it to the button to do it automatically. |
#4
|
|||
|
|||
Hi Phen,
Thanks for the clarification. One way to assure multiple sessions open in the desired order (in your scenario) is to set them to be ordered logically, instead of alphabetically. Then, when you open a folder of sessions, they should open in that expected order. This configuration option is found in the General category of SecureCRT's Global Options (Connect dialog sort order). With respect to the original inquiry, with the current objects, methods and properties available, I think you could accomplish your objective via a script, if desired. See the SecureCRT Help topic Scripting / Script Objects Reference. I think the GetTabCount() and GetTab() methods available to the Application Object along with the Index property available to the Tab Object are the ones you might need.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Hello.
I tried to change the index the way you proposed: Code:
tab = crt.GetActiveTab() tab.Index = 3 "Attribute Index of Tab objects is not writable" which was expected. |
#6
|
|||
|
|||
Hi Phen,
Correct, it's a read-only property. I rethought this and I don't think you can accomplish with the current APIs. I was thinking of tab caption swapping. ![]() I have added this thread to a feature request in our product enhancement database for the ability to reorder tabs through scripting. Should a future release of SecureCRT include this feature, notification will be posted here. If you prefer direct email notification, contact support@vandyke.com and include "Feature Request - Forum Thread #12023" in the subject line.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|