ButtonBar to support / understand local folder

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post by *Fla$her »

beb wrote: ↑2023-04-30, 07:47 UTC The last version is 2.0 beta17.
http://www.mgpsoft.net/Downloads/TCMenu20b17.zip
The repetition in this topic turned out to be truly contagious...
Fla$her wrote: ↑2023-04-27, 09:13 UTC This is a distant 2003. ) There is a version 6 years fresher.
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.
Last edited by Fla$her on 2023-04-30, 13:20 UTC, edited 2 times in total.
Overquoting is evil! πŸ‘Ž
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: ButtonBar to support / understand local folder

Post 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.
:D
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post 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). :lol:
beb wrote: ↑2023-04-30, 13:05 UTCNow I can see no reason to return to the buggy ex
Likewise.
Overquoting is evil! πŸ‘Ž
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: ButtonBar to support / understand local folder

Post 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.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post 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.
Overquoting is evil! πŸ‘Ž
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: ButtonBar to support / understand local folder

Post by *Horst.Epp »

Fla$her wrote: ↑2023-04-30, 14:22 UTC 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.
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
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: ButtonBar to support / understand local folder

Post by *petermad »

2igarny
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):

Code: Select all

**"%1"
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.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post 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):

Code: Select all

**"%1"
Quaint. :shock: 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
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: ButtonBar to support / understand local folder

Post by *petermad »

2Fla$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.
Last edited by petermad on 2023-05-02, 01:15 UTC, edited 2 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: ButtonBar to support / understand local folder

Post 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
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post 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.
Last edited by Fla$her on 2023-05-02, 01:28 UTC, edited 1 time in total.
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: ButtonBar to support / understand local folder

Post 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?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post 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
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: ButtonBar to support / understand local folder

Post 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?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: ButtonBar to support / understand local folder

Post 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
Overquoting is evil! πŸ‘Ž
Post Reply