is it possible to select another buttonbar with a command?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

is it possible to select another buttonbar with a command?

Post by *StickyNomad »

Hi there,

This is no big issue, but im interested if there's an alternate way to load another buttonbar than doing this with a button pointing to the according .bar-file.
It would be nice if this was also possible using a command (like 'cm_loadbar' e.g.). I'd like to have additional Bars to toggle between but i don't want to have a button for each, i'd rather like to have menu entries/Hotkeys to select them.
May be anyone knows a workaround (with e.g. TCScript)? I searched Help, this forum and TC Script commands, but i didn't find an answer

thanks in advance!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Would it be acceptable to you to close and restart TC? Possibly with saving the position before closing?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Sheepdog:
Would it be acceptable to you to close and restart TC?
hmm... that would be quite a hassle. i'd like to e.g display another toolbar with additional apps for drag'n'drop operations and then change back to my std buttonbar. Thus i'd like to have TCs window and actual file panels in exactly the same state than before selecting my desired buttonbar.
So the 'command of my dreams' should work without restarting, just the way it works when clicking a button to select the bar.

But as i said, its no big deal, i'd like such a feature but if there's no way to change the buttonbar with a command, i can live with two or three buttons more on my buttonbar to toggle them.

Would you have suggested a solution using TC Script?
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Here is the code to load a bar file with TCScript editor

Code: Select all

#include VKeys.h
#define VK_A 65
#define VK_B 66
#define VK_R 82
PostCmd(cm_ButtonConfig);//Open button configuration

SendVKey(VK_RETURN,2);//ask to open a new bar : it should open the bar folder

SendVKey(VK_A,2);// I called the bar "A.bar" for easy treatment
SendVKey(VK_DECIMAL,2);
SendVKey(VK_B,2);
SendVKey(VK_A,2);
SendVKey(VK_R,2);
SendVKey(VK_RETURN,2);//validate the bar file

SendVKey(VK_TAB,2); //Activate the OK button
SendVKey(VK_RETURN,2);

SendVKey(VK_TAB,2); //to answer NO of changing the default bar
SendVKey(VK_RETURN,2);
//The new bar is loaded
You will need at least 2 script : one to change the bar and one to restore the previous one.
TC#88260 -
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2franck8244:
Many thanks! Seems like you're quite a 'full-time TC Scripter' :wink: , as this was not the 1st time you've had a fast solution for my wish :D

I'll try this one and see if it will work for me.
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2StickyNomad
I'm just here to help.... :)

TCScript is powerful and easy to use (I made this script in less than 5 minutes) thought some function are kind of "buggy". That's why I can't use SendText so I use SendVKey and decompose the word...

The annoying thing with this script is :
- You should use short bar name
- It takes "some" time
- It makes a "beep"...

Have you tried TCtoolbar or TCmenu ?
TC#88260 -
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2franck8244
The annoying thing with this script is...
yep, these are some small disadvantages, but let's see...
Have you tried TCtoolbar or TCmenu ?
yes, i tried both and they are quite nice, but they are not suitable for drag'n'drop, which is quite useful for me, because i'd like to have some App icons on my second bar as drag'n'drop targets. i know, this wish is kind of exotic, maybe I'll stick with buttons to change bars...

Do you know if there's any kind of documentation for TC Script?
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Do you know if there's any kind of documentation for TC Script?
I haven't seen anyone...
The best thing to do is : open TCscript, look at some script example (I can provide some...), then try by yourself :D

The thing I do :
1-Start TCScript
2-Focus on TC
--start manually what I want to do (and memorize it)
--return to previous step
3-Back to TCScript
a--translate what I've manually done into code
--try it (F9)
---if the result is the same go to (2) and go one step further in operation
---if note go to 3a and correct it
4-When All is ok : smile !
TC#88260 -
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

The thing I do :
Yes, i tried a bit around too, but not very intense. seems like i'll go on with that...
do you have any clue what the command 'WndClass' is good for?

thanks,
Post Reply