Page 2 of 4
Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 11:21 UTC
by Fla$her
The repetition in this topic turned out to be truly contagious...
In fact, there are enough disadvantages for which TCMenu may not be suitable:
- doesn't take into account the settings of the current icons size
- doesn't use the cache of icons (i.e. in case of absence, their place will be empty)
- has a ribbon view view with scrolling instead of distributing columns across the screen
- doesn't support * at the beginning of button commands
- doesn't perceive paths with spaces without quotes in the beginnings of button commands
- after reaching the end of the list, when scrolling back, some elements may not be drawn
- significant limitations in the support of button parameters (special switches are available for some)
So if the author gives a competent answer to my question, I will share a more reliable solution for bar files under the cursor, which I did not want to publish right away.
Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 13:05 UTC
by beb
Fla$her wrote: 2023-04-30, 11:21 UTC
The repetition in this topic turned out to be truly...
It's hard to designate this as a repetition beyond the scrupulous procedures in the court of law.
The first user wrapped their idea into the poetry form hiding the essence behind the foggy devices of [markup] tongue.
The second user being neither Sherlock Holmes nor Dr Whatson didn't catch that idea, had been forced to check their archives, check the source, and only then posted dully technical but pretty transparent letters.
Fla$her wrote: 2023-04-30, 11:21 UTC
...contagious...
The second user is four-time vaccinated and still keeps a package of masks in their backpack, so may the disease do not come that far this time.
In fact, there are enough disadvantages for which TCMenu may not be suitable...
Agreed.
TCmenu has been a big love of mine back then. The love has gone as soon as the menu-in-the-button concept was natively implemented in TC. Now I can see no reason to return to the buggy ex.
Cheers.

Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 13:59 UTC
by Fla$her
beb wrote: 2023-04-30, 13:05 UTCThe first user wrapped their idea into the poetry form hiding the essence behind the foggy devices of [markup] tongue.
My poetic skills tell me that there is nothing poetic and even more foggy in the phrase about the freshness of the version.
Moreover, nothing prevents you from moving the cursor to the link to see the download path in the status bar.
beb wrote: 2023-04-30, 13:05 UTC
The second user is four-time vaccinated and still keeps a package of masks in their backpack, so may the disease do not come that far this time.
I'm afraid the new strains have made their own adjustments (having in mind the entire chain of posts with TCMenu).
beb wrote: 2023-04-30, 13:05 UTCNow I can see no reason to return to the buggy ex
Likewise.
Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 14:13 UTC
by Horst.Epp
There is one advantage of TCMenu compared to the native TC Pull-down menu.
In TCMenu I can click the button and get the default action.
Using Shift, Control or Alt is only ncessary for the other options.
In the TC pull-down its one click to get the menu and an additionl click to start any of the entries.
Also the AHK sources are available which allows modifications.
Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 14:22 UTC
by Fla$her
2Horst.Epp
Are you writing about some kind of AHK add-on over the program itself?
But according to the described, the essence of his work is unclear.
Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 14:41 UTC
by Horst.Epp
Fla$her wrote: 2023-04-30, 14:22 UTC
2
Horst.Epp
Are you writing about some kind of AHK add-on over the program itself?
But according to the described, the essence of his work is unclear.
Sorry that was my mistake.
The source is vailable for the plugin Toolbar which does a similar job as TCMenu.
Long time ago its was part of ButtonBar eXtended which I found to complicated.
http://www.ghisler.ch/board/viewtopic.php?t=20274
Re: ButtonBar to support / understand local folder
Posted: 2023-04-30, 21:13 UTC
by petermad
2
igarny
Would there be a Plugin solution for this. Something simple and small, that can read the *.BAR files and create a popup menu out of them?
You can use TC's
internal associations to open a bar file as a menu.
Assume that the local bar file is named
local.bar
Then you can add an Internal Association for the file type local.bar with this command (Actions -> Open):
Then pressing Enter or double-click on on any local.bar file will open this local bar as a menu.
To automatically position the cursor on the local.bar file you can put these two commands in your
usercmd.ini file:
Code: Select all
[em_selectlocalbar]
cmd=SELECTFILES local.bar
[em_gotolocalbar]
cmd=cm_ClearAll,cm_GoToFirstEntry,em_selectlocalbar,cm_GotoNextSelected,cm_UnselectCurrentNameExt
em_gotolocalbar can then be used as the command in a button.
If you expand the em_gotolocalbar command to this:
Code: Select all
[em_openlocalbar]
cmd=cm_ClearAll,cm_GoToFirstEntry,em_selectlocalbar,cm_GotoNextSelected,cm_UnselectCurrentNameExt,cm_Return,cm_GoToFirstEntry
Then the [em_openlocalbar command will open the bar menu by itself, but if there is NO local.bar file in the folder, then the file or folder under the cursor will be opened/executed.
You could make use of the em_openlocalbar by making a
View Mode (called for example localbar) and use the
em_openlocalbar command in the "
Auto-run commands" field, and then make an
Auto Switch Mode that sets '"
localbar" as the mode for the
Rule "? At least one match" for
File types: local.bar - then the locar bar menu will open
automatically when you enter any folder that contains a local.bar file.
If you are interested I can make some screenshots illustrating how to implement the above.
Re: ButtonBar to support / understand local folder
Posted: 2023-05-01, 15:15 UTC
by Fla$her
petermad wrote: 2023-04-30, 21:13 UTC
Then you can add an Internal Association for the file type local.bar with this command (Actions -> Open):
Quaint.

In the help, this method of specifying the full name after ** is not stated.
petermad wrote: 2023-04-30, 21:13 UTCTo automatically position the cursor on the local.bar file you can put these two commands in your
usercmd.ini file:
Was this requested? If the full name is known, then there is no point in starting this whole thing.
However, here it would be possible to do without this with a simple command:
cd local.bar
Re: ButtonBar to support / understand local folder
Posted: 2023-05-01, 17:35 UTC
by petermad
2
Fla$her
cd local.bar
Sure - much simpler - so it can be revised to:
Code: Select all
[em_gotolocalbar]
cmd=cd local.bar
[em_openlocalbar]
cmd=em_gotolocalbar,cm_Return,cm_GoToFirstEntry
But it still gives unwanted results when there is no local.bar file in the folder.
Re: ButtonBar to support / understand local folder
Posted: 2023-05-01, 17:44 UTC
by petermad
Was this requested?
I am not sure - in the first post it says:
I am not able to trick TC to open the bar file from the local folder and make use of "display as menu" option of the ButtonBar
Indicating that a button for this is requested - and to use a button, the cursor has to be positioned on the local.bar file in order to make cm_Return trigger the Internal Association.
It would be much better if the OPENBAR supported the "Show as menu" option - as I request here:
viewtopic.php?p=429769#p429769
Re: ButtonBar to support / understand local folder
Posted: 2023-05-01, 22:15 UTC
by Fla$her
I just saw the edit of the first post. It turns out that it is not necessary to position the cursor on the bar file, you just need to open the menu for the nested bar file in the current folder:
igarny wrote: 2023-04-26, 18:28 UTCI would like to be able to load a bar with a fixed short name, but depending on the local folder.
But I suggest a smarter solution (without having to put bar files in different folders):
1. Create a folder: %COMMANDER_PATH%\
Bars
2. Put bar files with
base folder names in it (
FolderName.bar,
DirName.bar, etc.)
3. Create
em_ChangeEnvBarName with the command
%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef msg(55555,0,0)
4. Add the missing to autorun.cfg:
Code: Select all
LoadLibrary Plugins\Autorun_Tweaks.dll
LoadLibrary Plugins\Autorun_Runtime.dll
SetMessageAction 55555 SetEnvCurBar
Func SetEnvCurBar
CD = WinGetText(RequestInfo(8 + RequestInfo(1000)))
If StrLen(CD) > 0 Then
SetEnv Bar %"StrPart(StrMid(CD, StrPos(CD, '\', -2) + 1), '\', 1)"
Else
SetEnv Bar
EndIf
EndFunc
5. Create the
ChangeEnvBarName view mode with autorun
em_ChangeEnvBarName.
6. Configure Auto Switch Mode, specifying all the necessary directories and setting the mode
ChangeEnvBarName.
7. Create a button with the command
Bars\%Bar%.bar
After that, going, for example, to D:\AnyPath\
DirName, when the button is clicked, %COMMANDER_PATH%\
Bars\
DirName.bar will open as a menu.
Re: ButtonBar to support / understand local folder
Posted: 2023-05-02, 01:14 UTC
by petermad
Fla$her wrote: 2023-05-01, 22:15 UTC
I just saw the edit of the first post. It turns out that it is not necessary to position the cursor on the bar file, you just need to open the menu for the nested bar file in the current folder:
Which menu is it that you are referring to for the nested bar file?
Re: ButtonBar to support / understand local folder
Posted: 2023-05-02, 01:22 UTC
by Fla$her
petermad wrote: 2023-05-02, 01:14 UTCWhich menu is it that you are referring to for the nested bar file?
The quote states:
igarny wrote: 2023-04-26, 18:28 UTCa bar with a fixed short name
Re: ButtonBar to support / understand local folder
Posted: 2023-05-02, 01:53 UTC
by petermad
Fla$her wrote: 2023-05-02, 01:22 UTC
The quote states:
igarny wrote: 2023-04-26, 18:28 UTCa bar with a fixed short name
And what does that have to do with a menu for a nested bar file?? What is a menu for a bar file? The context menu?
Re: ButtonBar to support / understand local folder
Posted: 2023-05-02, 02:19 UTC
by Fla$her
petermad wrote: 2023-05-02, 01:53 UTC
And what does that have to do with a menu for a nested bar file?? What is a menu for a bar file?
For (In relation to) the bar file placed in the local folder, the toolbar opens as a menu. What's not clear here? You quoted it yourself:
... open the bar file from the local folder and make use of "display as menu" option of the ButtonBar