Context Menu/Internal association

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Context Menu/Internal association

Post by *nsp »

I suggest to e able to call an em/cm command from internal association.
I currently do it with powerpro but i've been asked to do it without any external tools inside TC. I did not found any good solution...

It could be great to have right click menu inside TC like for file association to have multiple entries (fake verb) calling a command or internal command. Currently it seems that only pgm can be called. I do not want to call tcfs2 or tcmd or any external command.

The ability to support cm/em command with icon on the TC part of context menu could be a nice addition.
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Context Menu/Internal association

Post by *petermad »

2nsp
Does this help:
Help wrote:Dialog box: Edit file type (internal associations)
Open

.
.
.
***command Start internal command, e.g. ***cm_List %1
Note: The "Open" action of archive file extensions such as .zip can only be redefined with ***command. The extension must be explicitly put in the search string, e.g. *.zip *.rar
You can also use it with for example ***OPENBARMENU "%1" or ***em_command

To have multiple programs associated to a file type use ** as the Open action and the define additional associations with the New button: https://tcmd.madsenworld.dk/multiassociation.png

Then all the associated options is shown in top of the context menu: https://tcmd.madsenworld.dk/multiassociationcontextmenu.png

the code in wincmd.ini for this looks like:

Code: Select all

[Searches]
Billeder_SearchFor=*.gif *.jpg *.jpeg *.jpe *.jfif *.png *.bmp *.adi *.cdr *.cgm *.clp *.cut *.dib *.drw *.dxf *.eps *.gem *.hgl *.iff *.img *.jif *.lbm *.mac *.pnt *.pntg *.msp *.pbm *.pcd *.pct *.pcx *.pgm *.pic *.pict *.pct *.plt *.ppm *.psd *.ras *.raw *.rle *.tga *.psp *.tif* *.jp2 *.wdp *.webp *.ccx *.heic *.wmf *.dds *.arw *.svg *.cr2 *.cr3 *.ico
Billeder_SearchIn=
Billeder_SearchText=
Billeder_SearchFlags=0|002002000020|||||||||0000|||

[Associations]
Filter16=>Billeder
Filter16_open=**
Filter16.icon=**
Filter16_Lister Directshow=***cm_List /P
Filter16_Lister Imagine=***cm_List /Pimagine
Filter16_Lister PhotoViewer=***cm_List /Pphotoviewer
Filter16_Lister ICLView=***cm_List /Piclview
Filter16_Lister SVGView=***cm_List /PSVGView
Filter16_Lister Stifinder=***cm_List /T8
Filter16_Imagine (wcx)=**png
Filter16_Windows Fotofremviser=rundll32.exe shimgvw.dll,ImageView_Fullscreen %1
Filter16_Imagine=""%COMMANDER_PATH%\PLUGINS\WLX\imagine\Imagine64.exe" "%1""
Filter16_PaintShop Pro="%COMMANDER_PATH%\PROGRAMS\PSP\PSP.EXE" %1
Filter16_IrfanView=""%COMMANDER_PATH%\PROGRAMS\IrfanView\i_view32.exe" "%1""
Filter16_XnView=""%PROGRAMFILES(x86)%\XnView\xnview.exe" "%1""
Filter16_Button Menu=**%COMMANDER_PATH%\LANGUAGE\wcmd_pm_dan\viewers.bar
replace Filter16 with your number.

______________________________


You can also associate a file type to a buttonbar menu - here is how it looks when I double-click on a jpg file: https://tcmd.madsenworld.dk/associationbuttonbarmenu.png

the code for this in wincmd.ini:

Code: Select all

[Associations]
Filter14=*.JPG
Filter14_open=**%COMMANDER_PATH%\LANGUAGE\wcmd_pm_dan\viewers.bar
and in viewers.bar:

Code: Select all

[Buttonbar]
Buttoncount=25
button1=wcmicons.dll,15
cmd1=OPENBAR *
iconic1=0
menu1=Tilbage
button2=%COMMANDER_PATH%\PROGRAMS\PSP\PSP.EXE
cmd2=%COMMANDER_PATH%\PROGRAMS\PSP\Psp.exe
param2=%P%N
iconic2=0
menu2=Paint Shop Pro
button3=%COMMANDER_PATH%\PLUGINS\wlx\Imagine\Imagine64.exe
cmd3=%COMMANDER_PATH%\PLUGINS\wlx\Imagine\Imagine64.exe /viewer
param3=%P%N
iconic3=0
menu3=Imagine Viewer
button4=%COMMANDER_PATH%\PROGRAMS\IrfanView\i_view32.exe
cmd4=%COMMANDER_PATH%\PROGRAMS\IrfanView\i_view32.exe
param4=%P%N
iconic4=0
menu4=IrfanView
button5=%ProgramFiles(x86)%\XnView\xnview.exe
cmd5=%ProgramFiles(x86)%\XnView\xnview.exe
param5=%P%N
iconic5=0
menu5=XnView
button6=c:\Program Files (x86)\XnViewMP\xnviewmp.exe
cmd6=c:\Program Files (x86)\XnViewMP\xnviewmp.exe
param6=%P%N
iconic6=0
menu6=XnView MP
button7=%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll
cmd7=rundll32.exe shimgvw.dll,ImageView_Fullscreen
param7=%P%N
iconic7=0
menu7=Windows Fotofremviser
button8=
iconic8=0
button9=wciconex.dll,27
cmd9=cm_List
iconic9=0
menu9=Lister - Auto
button10=wciconex.dll,27
cmd10=cm_List /P
iconic10=0
menu10=Lister - Internal
button11=wciconex.dll,27
cmd11=cm_List /Pimagine
iconic11=0
menu11=Lister - Imagine
button12=wciconex.dll,27
cmd12=cm_List /PphotoViewer
iconic12=0
menu12=Lister - PhotoViewer
button13=wciconex.dll,27
cmd13=cm_List /T8
iconic13=0
menu13=Lister - Explorer View
button14=wciconex.dll,27
cmd14=cm_List /Piclview
iconic14=0
menu14=Lister - ICLView
button15=wciconex.dll,27
cmd15=cm_List /Pmmedia
iconic15=0
menu15=Lister - Mmedia
button16=
iconic16=0
button17=%PROGRAMW6432%\MPC-HomeCinema\mpc-hc64.exe
cmd17=%PROGRAMW6432%\MPC-HomeCinema\mpc-hc64.exe
param17=%P%N
iconic17=0
menu17=MPC-HomeCinema
button18=c:\Program Files\MPC-BE-Player\mpc-be64.exe
cmd18=""c:\Program Files\MPC-BE-Player\mpc-be64.exe""
param18=%P%N
iconic18=0
menu18=MPC-BE Player
button19=c:\Program Files\VideoLAN\VLC\vlc.exe
cmd19=""c:\Program Files\VideoLAN\VLC\vlc.exe""
param19=%P%N
iconic19=0
menu19=VLC Player
button20=%ProgramFiles%\Windows Media Player\wmplayer.exe
cmd20=%ProgramFiles%\Windows Media Player\wmplayer.exe
param20=%P%N
iconic20=0
menu20=Windows Media Player
button21=%ProgramFiles(x86)%\QuickTime\QuickTimePlayer.exe
cmd21=%ProgramFiles(x86)%\QuickTime\QuickTimePlayer.exe
param21=%P%N
iconic21=0
menu21=QuickTime
button22=C:\Program Files (x86)\DivX\DivX Player\DivX Player.exe
cmd22=""C:\Program Files (x86)\DivX\DivX Player\DivX Player.exe""
param22=%P%N
iconic22=0
menu22=DivX Player
button23=c:\Program Files (x86)\Flashplayer\flashplayer_32_sa.exe
cmd23=""c:\Program Files (x86)\Flashplayer\flashplayer_32_sa.exe""
param23=%P%N
iconic23=0
menu23=Adobe Flash Player
button24=
iconic24=0
button25=shell32.dll
cmd25=explorer.exe
param25=%P%N
iconic25=0
menu25=Standard
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Context Menu/Internal association

Post by *nsp »

Yes it helps if i could see it in the help file i have.
it also does not take cm/em command icon and description.

// this is what i see in the help file: 11.55rc6
Dialog box: Edit action

Here you can define or modify an action (verb) of a given file type.

Action (verb) Name of the action, e.g. 'open' or 'print'.

Action description Text shown in the context menu (right click menu) for this action. On non-English systems, this contains the translated text of the verb. Not used for internal associations.

Command Command executed when this action is selected in the context menu. To pass the associated file to the launched program, you need to either use a command line parameter (%1 or "%1"), or use DDE.

The following DDE options are only available for system associations, not internal associations:

Use DDE Windows should use DDE to pass the file name to the started program. This allows you to open multiple files with a single program, e.g. WinWord.

DDE Message DDE-Command sent to the program to open the file. The command is usually passed in brackets. Example: [FileOpen("%1")]

DDE Application Name of the application used for the DDE connection, e.g. WinWord.

DDE Message when application is not running
Some applications use a different message when the program isn't running than if it is when the command is sent.
Example: If you choose 'Print' for Excel files, the 'not running' command would be [open("%1")][print()][quit()], which causes Excel to close after printing.
If Excel is already running, the command is [open("%1")][print()][close()], which closes only the printed document and leaves Excel open.

DDE Topic The DDE topic for the DDE connection. For most applications, this is set to 'System'.

OK Saves the current settings of this verb to the registry, and closes the dialog.

Cancel Closes the dialog without saving the changes you made.

Help Starts Help with this page.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7028
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Context Menu/Internal association

Post by *Horst.Epp »

2nsp
If you read the help entry Petermad refers you will see the text.
The entry is
Dialog box: Edit file type (internal associations)
Easy to find in the help search dialog
Windows 11 Home, Version 24H2 (OS Build 26100.4484)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1396a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.6 x64
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Context Menu/Internal association

Post by *petermad »

Yes it helps if i could see it in the help file i have
Open the Internal Association dialog. Add a New or Edit an existing entry - in that dialog ("Edit file type") you can click the Help button or press F1.

Notice that I have added examples to my previous post.

You can also run

Code: Select all

hh.exe %COMMANDER_PATH%\TOTALCMD.CHM::dialog_box__edit_file_type_internal.htm
from the command line to open that help page:
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Context Menu/Internal association

Post by *nsp »

petermad wrote: 2025-06-17, 10:51 UTC
Yes it helps if i could see it in the help file i have
Open the Internal Association dialog. Add a New or Edit an existing entry - in that dialog ("Edit file type") you can click the Help button or press F1.

Notice that I have added examples to my previous post.

You can also run

Code: Select all

hh.exe %COMMANDER_PATH%\TOTALCMD.CHM::dialog_box__edit_file_type_internal.htm
from the command line to open that help page:
If you give a try with latest 11.55rc6 totalcmd.chm from 2025.06.11 (eb1d7c97042f836a239b18ff9dc5a4e1) you will see what i mean about not able to see it !
Your sample is very clear also adding button Menu (mini bars) is a great tip !
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Context Menu/Internal association

Post by *nsp »

Your sample is very clear also adding button Menu (mini bars) is a great tip !
-- Edited
by mistake, i was using an old darkhelp2 where this part *** was missing...
User avatar
tuska
Power Member
Power Member
Posts: 4132
Joined: 2007-05-21, 12:17 UTC

Re: Context Menu/Internal association

Post by *tuska »

petermad wrote: 2025-06-17, 10:51 UTC You can also run

Code: Select all

hh.exe %COMMANDER_PATH%\TOTALCMD.CHM::dialog_box__edit_file_type_internal.htm
from the command line to open that help page:
- OR -

Code: Select all

hh.exe %COMMANDER_PATH%\language\wcmd_eng.chm::dialog_box__edit_file_type_internal.htm
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Context Menu/Internal association

Post by *petermad »

2nsp
by mistake, i was using an old darkhelp2 where this part *** was missing...
It was added in the (dark) Help for TC 10.00 at august 2nd 2023 - almost 2 years ago.

Current darkhelp: https://www.ghisler.ch/board/viewtopic.php?p=371373#p371373
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Context Menu/Internal association

Post by *petermad »

2tuska
hh.exe %COMMANDER_PATH%\language\wcmd_eng.chm::dialog_box__edit_file_type_internal.htm
There will only be a wcmd_eng.chm file if the user has manually copied the English totalcmd.chm file to language\wcmd_eng.chm - or if my Languagebar is installed.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 4132
Joined: 2007-05-21, 12:17 UTC

Re: Context Menu/Internal association

Post by *tuska »

petermad wrote: 2025-06-17, 20:02 UTC 2tuska
hh.exe %COMMANDER_PATH%\language\wcmd_eng.chm::dialog_box__edit_file_type_internal.htm
There will only be a wcmd_eng.chm file if the user has manually copied the English totalcmd.chm file
to language\wcmd_eng.chm - or if my Languagebar is installed.
Yes, I use WCMD_ENG.CHM to switch between the German and English help files:
%COMMANDER_PATH%\LANGUAGE\WCMD_DEU.CHM
%COMMANDER_PATH%\LANGUAGE\WCMD_ENG.CHM

In %COMMANDER_PATH%, I only have the German help file “TOTALCMD.CHM”
(and here, for understandable reasons, only a blank help page was displayed).

I used your language bar before too.
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Context Menu/Internal association

Post by *nsp »

I also use %COMMANDER_PATH%\LANGUAGE\WCMD_ENGdark.CHM and also %COMMANDER_PATH%\LANGUAGE\WCMD_FRA.CHM and by mistake i did a copy of TotalcmdDark2.chm long time ago and update of TC never update nor warn about help file.
TC install Provide language files LNG/MNU/INC but not the associated help and no commander_help variable is available.
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Context Menu/Internal association

Post by *petermad »

TC install Provide language files LNG/MNU/INC but not the associated help
The TC installer also provides totalcmd.chm in either English or German, depending of the installation.

But TotalcmdDark.chm, wcmd_deuDark.chm and wcmd_engDark.chm are provided by me, not by Ghisler, so after an update of TC you have to either install the updated version of my Dark Help ( viewtopic.php?p=371373#p371373 ), my Language Bar ( viewtopic.php?p=369783#p369783 ) or my Extended Menus ( viewtopic.php?p=242336#p242336 ) to have the dark Help updated.

I usually update those packages within 24 hours after each TC update (not betas).

I also update the Ultra TC Editors datafiles ( viewtopic.php?p=466274#p466274 ) after each TC update.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Context Menu/Internal association

Post by *petermad »

2nsp
BTW if you use one * as the Open action, TC opens a context menu only with the associated options: https://tcmd.madsenworld.dk/multiassociation1.png when you double-click the file - https://tcmd.madsenworld.dk/multiassociationcontextmenu2.png
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Context Menu/Internal association

Post by *nsp »

petermad wrote: 2025-06-18, 10:46 UTC
TC install Provide language files LNG/MNU/INC but not the associated help
The TC installer also provides totalcmd.chm in either English or German, depending of the installation.
Yes but not in form of wcmd_en.chm or wcmd_deu.chm which is weird as in case those files are presents it takes precedence over std totalcmd.chm.
petermad wrote: 2025-06-18, 10:46 UTC But TotalcmdDark.chm, wcmd_deuDark.chm and wcmd_engDark.chm are provided by me, not by Ghisler, so after an update of TC you have to either install the updated version of my Dark Help ( viewtopic.php?p=371373#p371373 ), my Language Bar ( viewtopic.php?p=369783#p369783 ) or my Extended Menus ( viewtopic.php?p=242336#p242336 ) to have the dark Help updated.

I usually update those packages within 24 hours after each TC update (not betas).

I also update the Ultra TC Editors datafiles ( viewtopic.php?p=466274#p466274 ) after each TC update.
My bad is that i took your extended menu and made modification to suit my needs over the time without updating from original source :(
I will rename my personal copy and will do the update for next time. (to get latest help during rc tst, i will just disable the wcmd_xx.chm file adding .disable in the extension )
I always advise to use your menu and your em_command as a masterpiece to picture TC capabilities..
Post Reply