Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 10-04-2013, 04:41 PM
gates2010 gates2010 is offline
Registered User
 
Join Date: Jun 2012
Posts: 19
Question Manually edit ButtonBarV3.ini and load new buttons to SecureCRT

Hi,

I have different type of systems that I connect to, and they have different type of commands/events buttons configured.

I do have some commons entries across them, I would like to edit the ButtonBarV3.ini file and restart securecrt to have the new buttons loaded.

I have tried to do this, but it doesn't seem to work. I am using version 6.7.5 (x64 build 411).


Can this be done? If so how?


Thank you in advance..
Reply With Quote
  #2  
Old 10-04-2013, 05:01 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hello gates2010,

I am a little confused by your references.

Quote:
I have different type of systems that I connect to, and they have different type of commands/events buttons configured.
What do you mean by commands/events buttons?

Quote:
I do have some commons entries across them, I would like to edit the ButtonBarV3.ini file and restart securecrt to have the new buttons loaded.
You do not need to (and really should not) edit the button bar *file*. You edit the Button Bar from within SecureCRT. You also do not need to restart SecureCRT after editing the button bar.

For example, to edit an existing button, right-click on that button and choose "Edit Button..." from the context menu.

If you have multiple button bars, choose the desired button bar you wish to edit in the dropdown on the left and then edit the appropriate button, etc.

Please refer to these resources about the Button Bar if still unclear:

(Button Bar video)
https://www.youtube.com/watch?v=olyCcUWRimI

(Button Bar online tip)
http://www.vandyke.com/support/tips/buttonbar.html
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 10-06-2013, 10:45 PM
gates2010 gates2010 is offline
Registered User
 
Join Date: Jun 2012
Posts: 19
Hi Brenda,

I don't think I was clear enough, I am familiar with the usual way to create new buttons on the button bar from with in securecrt.

I was looking for an option to edit the button bar from the ini file, the reason being when I start connecting to a new type/group of systems there are some specific values that I need to modify in the commands that I have already setup in button bar for similar system.

To do the copy paste of button onto a new button bar and then edit them to apply to the current system is a tedious process, I was hoping to manually edit the ini file to be able to create a new button bar and make the necessary changes from the ini itself.

Hope this help,
Thanks.
Reply With Quote
  #4  
Old 10-07-2013, 09:38 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hello gates2010,

Thanks for the clarification.

Quote:
I have tried to do this, but it doesn't seem to work. I am using version 6.7.5 (x64 build 411).
Please elaborate on the above statement.

What did you try?

In what way did it not work?

My best suggestion would be to make a button bar with mapped buttons that encompasses the possible scenarios so that you can analyze the file and pattern-match to be able to add what you want.

Every Z: entry is a separate button bar. It represents a multi-line string, so each mapped button on a particular button bar would be on its own line.

Code:
Z:"Default"=00000004
 SEND,send string,send string,,,
 MENU_NEW_WINDOW,,menu_new_win,,,
 SB_LINE_UP,,sb_line_up,,,
 TN_ABORT_OUTPUT,,tn_abort,,,
Z:"gates2010"=00000004
 VT_PF1,,vt_pf1,,,
 SSH_NEW_SESSION,,ssh_new_sess,,,
 RUN,C:\\Users\\vdt-csg\\Desktop\\test_forum.vbs,test script,,hello,
 LAUNCH,"c:\\windows\\system32\\notepad.exe" arg here,run notepad,,,
For example, the information above is a result of using Default button bar for the first four functions available in the dropdown menu:
  • Send String
  • Menu Function
  • Scroll Bar Function
  • Telnet Function
Then, I created a new button bar named gates2010 with the remaining 4 functions mapped to buttons:
  • VT Function
  • SSH Function
  • Run Script
  • Launch Application
The list of exact function names (for Menu Function, Scroll Bar, etc.) is found in the SecureCRT Help topic Configuring the Keyboard / Table of Keymap Functions.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 12-02-2013, 07:17 AM
houdema houdema is offline
Registered User
 
Join Date: Dec 2013
Posts: 11
Any progress with this...?

I'm creating a new button bar which will have over 30 buttons (most are login nodes) and I too have been trying to open and manually edit the "ButtonBarV3.ini" file which would be so much easier than creating each button from within SecureCRT. Not to mention the buttons beyond the horizontal window space (drop-down) can't seem to be edited.

The problem I have is that after adding additional lines (buttons) to the ButtonBarV3.ini file, saving and then starting SecureCRT, the button bar reverts back to the file before my changes. I'm basically copy and pasting the same lines then changing the IP Address and button name.

Am I missing something here?
Reply With Quote
  #6  
Old 12-02-2013, 09:57 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hello houdema,

Were the entries you added in the correct format?

Quote:
The problem I have is that after adding additional lines (buttons) to the ButtonBarV3.ini file, saving and then starting SecureCRT, the button bar reverts back to the file before my changes.
What do you mean by "reverts back to the file before my changes"?

Did you rename the original file and the new, edited file the valid name that SecureCRT loads (ButtonBarV3.ini)?

What application did you use to edit the file?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 12-04-2013, 04:10 PM
houdema houdema is offline
Registered User
 
Join Date: Dec 2013
Posts: 11
Sorry for the late reply. My account won't let me subscribe to threads for some reason.

I use Notepad++ on a Win7 64bit machine

I opened the existing file from here:

C:\Users\username\AppData\Roaming\VanDyke\Config\ButtonBarV3.ini

Then with SecureCRT not running I make my edits directly to the ButtonBarV3.ini file. Here are a few of the existing button entries I've created from within SecureCRT:

SEND,show service service-using\\r,Epipe Status,,,
SEND,show router ldp session\\r \r\n,LDP Status,,,
SEND,show service sap-using\\r \r\n,SAP Status,,,

So if I were to copy one line above and then past it below the last line, change the command portion to whatever I needed and then save the file everything seems good. However, after launching SecureCRT I find that any changes I made to the ButtonBarV3.ini file are gone and the file reverts back to it's last known good setting.
Reply With Quote
  #8  
Old 12-04-2013, 05:32 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hello houdema,

Quote:
So if I were to copy one line above and then past it below the last line, change the command portion to whatever I needed and then save the file everything seems good. However, after launching SecureCRT I find that any changes I made to the ButtonBarV3.ini file are gone and the file reverts back to it's last known good setting.
Let's focus just on these statements for a minute.

So you copy a line and paste it into the file. You then confirm by time/date stamp the changes have been saved, correct?

Then you launch SecureCRT and find the changes are gone. If you return to the file and reopen it, is the added line still there?

I am thinking maybe you have multiple configuration folders (and thus multiple ButtonBarV3.ini files) on your computer.

Do you start SecureCRT from a shortcut?

If so, does the target field of the shortcut's Properties dialog include a command-line option (/F) to point to an alternate config?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #9  
Old 12-04-2013, 05:34 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hi houdema,

By the way, do you get an error when you try to subscribe to threads?

If so, what is it?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #10  
Old 12-05-2013, 08:59 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hello houdema,

A colleague just pointed something out to me that may not have occurred to you.

As already noted in this thread, editing the button bar file in this way is *not* recommended. However, please note that the first line (beginning with Z:) serves as a counter to how many buttons appear on that button bar.

So if you were to add your one line to an entry such as below:

Code:
Z:"houdema"=00000002
  RUN,C:\\Users\\username\\Desktop\\test_forum.vbs,test script,,hello,
  LAUNCH,"c:\\windows\\system32\\notepad.exe" arg here,run notepad,,,
to:
Code:
Z:"houdema"=00000003
  RUN,C:\\Users\\username\\Desktop\\test_forum.vbs,test script,,hello,
  LAUNCH,"c:\\windows\\system32\\notepad.exe" arg here,run notepad,,,
  SEND,show service service-using\\r,Epipe Status,,,
Note that you would also need to change the "2" to a "3".
__________________
Thanks,
--Brenda

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

Last edited by jdev; 12-05-2013 at 09:48 AM.
Reply With Quote
  #11  
Old 12-05-2013, 11:51 AM
houdema houdema is offline
Registered User
 
Join Date: Dec 2013
Posts: 11
Quote:
Originally Posted by bgagnon View Post
Hi houdema,

By the way, do you get an error when you try to subscribe to threads?

If so, what is it?
Hi Brenda, it appears my subscription issue is resolved! I can now add subscriptions/notifications. Thanks for fixing!

Mark
Reply With Quote
  #12  
Old 12-05-2013, 11:58 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hi Mark,

Thanks for the update.

The issue was likely due to your moderated status.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #13  
Old 12-05-2013, 12:02 PM
houdema houdema is offline
Registered User
 
Join Date: Dec 2013
Posts: 11
Quote:
Originally Posted by bgagnon View Post
Hello houdema,

A colleague just pointed something out to me that may not have occurred to you.

As already noted in this thread, editing the button bar file in this way is *not* recommended. However, please note that the first line (beginning with Z:) serves as a counter to how many buttons appear on that button bar.

So if you were to add your one line to an entry such as below:

Code:
Z:"houdema"=00000002
  RUN,C:\\Users\\username\\Desktop\\test_forum.vbs,test script,,hello,
  LAUNCH,"c:\\windows\\system32\\notepad.exe" arg here,run notepad,,,
to:
Code:
Z:"houdema"=00000003
  RUN,C:\\Users\\username\\Desktop\\test_forum.vbs,test script,,hello,
  LAUNCH,"c:\\windows\\system32\\notepad.exe" arg here,run notepad,,,
  SEND,show service service-using\\r,Epipe Status,,,
Note that you would also need to change the "2" to a "3".
Hi Brenda, That was the fix! By adjusting that counter number I was able to successfully edit the ButtonBarV3.ini file.

This works great for me as I have many buttons and bars and editing from within the file is just much quicker for me despite that it's not recommended. Of course I always have a backup!

Mark
Reply With Quote
  #14  
Old 12-05-2013, 12:17 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,153
Hi Mark,

Excellent, I am glad to hear the issue is resolved.

Good idea with the config backup!
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #15  
Old 12-31-2019, 09:28 AM
darkknight darkknight is offline
Registered User
 
Join Date: Dec 2006
Posts: 6
Sorry to bring up an old post. I just did this with the ButtonBarV5.ini and it worked perfectly as well.

But I wanted to point out a couple things.

The counter is in HEX and don't change the "length" of the counter

One entry, counter has 8 characters (00000001)
Code:
Z:"TestBar"=00000001
 SEND,test1_data1\\r\\ptest1_data2\\r\\p,test1,,,0,1,
22 entries, counter STILL has 8 characters (00000016) but 22 in hex is 16

Code:
Z:"TestBar2"=00000016
 SEND,test1_data1\\r\\ptest1_data2\\r\\p,test1,,,0,1,
 SEND,test2_data1\\r\\ptest2_data2\\r\\p,test2,,,0,1,
 SEND,test3_data1\\r\\ptest3_data2\\r\\p,test3,,,0,1,
 SEND,test4_data1\\r\\ptest4_data2\\r\\p,test4,,,0,1,
 SEND,test5_data1\\r\\ptest5_data2\\r\\p,test5,,,0,1,
 SEND,test6_data1\\r\\ptest6_data2\\r\\p,test6,,,0,1,
 SEND,test7_data1\\r\\ptest7_data2\\r\\p,test7,,,0,1,
 SEND,test8_data1\\r\\ptest8_data2\\r\\p,test8,,,0,1,
 SEND,test9_data1\\r\\ptest9_data2\\r\\p,test9,,,0,1,
 SEND,test10_data1\\r\\ptest10_data2\\r\\p,test10,,,0,1,
 SEND,test11_data1\\r\\ptest11_data2\\r\\p,test11,,,0,1,
 SEND,test12_data1\\r\\ptest12_data2\\r\\p,test12,,,0,1,
 SEND,test13_data1\\r\\ptest13_data2\\r\\p,test13,,,0,1,
 SEND,test14_data1\\r\\ptest14_data2\\r\\p,test14,,,0,1,
 SEND,test15_data1\\r\\ptest15_data2\\r\\p,test15,,,0,1,
 SEND,test16_data1\\r\\ptest16_data2\\r\\p,test16,,,0,1,
 SEND,test17_data1\\r\\ptest17_data2\\r\\p,test17,,,0,1,
 SEND,test18_data1\\r\\ptest18_data2\\r\\p,test18,,,0,1,
 SEND,test19_data1\\r\\ptest19_data2\\r\\p,test19,,,0,1,
 SEND,test20_data1\\r\\ptest20_data2\\r\\p,test20,,,0,1,
 SEND,test21_data1\\r\\ptest21_data2\\r\\p,test21,,,0,1,
 SEND,test22_data1\\r\\ptest22_data2\\r\\p,test22,,,0,1,
 SEND,test23_data1\\r\\ptest23_data2\\r\\p,test23,,,0,1,

Hope that helps someone in the future when doing a search.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 04:25 AM.