Is it possible to 'combine' two ''internal association''?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Hurdet
Power Member
Power Member
Posts: 626
Joined: 2003-05-10, 18:02 UTC

Is it possible to 'combine' two ''internal association''?

Post by *Hurdet »

If i set a internal association for "*.pdf;*.epub"
and after a for for "*.pdf"
the second not work.
do it is possible to combine two "internal association"?
User avatar
petermad
Power Member
Power Member
Posts: 14816
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

do it is possible to combine two "internal association"?
NO, not AFAIK.
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
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It was requested many times but it is still not possible.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately it would cause too many problems with duplicate verbs, and backwards compatibility.

Just create two separate internal associations, one for *.pdf and another for *.epub. It's a bit more work, but will do the same.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It won't cause any problems if it will be optional. But (as it was mentioned many times) current behaviour makes using multiple verbs for different file types much more complicated (because verbs have to be inserted/updated in all types) -- same thought is applied to user-defined tooltips.
User avatar
Stance
Power Member
Power Member
Posts: 1079
Joined: 2005-03-29, 06:26 UTC

Re: Is it possible to 'combine' two ''internal association''

Post by *Stance »

Hurdet wrote:If i set a internal association for "*.pdf;*.epub"
and after a for for "*.pdf"
the second not work.
do it is possible to combine two "internal association"?
How to use internal file associations effectively
http://www.ghisler.ch/board/viewtopic.php?t=27132

Yes, it is possible. In my contextmenu I have for *.txt-files 2 items:
- Open (internal)
- Open-Notepad (Internal)

Code: Select all


associations-searches.INI

[searches]

[Associations]
Filter1=>Text
Filter1_open=""C:\Program Files\Textedit\textedit.exe" "%1""
Filter1_open-Notepad="notepad.exe "%1"
Filter2=>Images
Filter2_open=""C:\Program Files\AnyViewer\AnyViewer.exe" "%1""
Filter2_open-AnotherViewer64=""E:\Program Files\AnotherViewer64\AnotherViewer64.exe" "%1""
Filter3=>ALL
Filter3_open=**
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Stance,
The question was if it is possible to merge items from multiple associations.
E.g. you have "Open Document" action for "*.doc;*.xls" and "Open Word Document" action for "*.doc", and you will not see both actions in context menu of .doc file, you will only see actions (and icon/default action) from an association that is placed first in associations list (even if this association doesn't contain icon/default action).
And this problem was also noticed in the topic you've mentioned (and in some other topics too).
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I cannot remember anymore what the reason was to not implement the following (I guess it has been suggested before):
  • Don't change anything in the configuration or storage of internal associations.
  • When executing e.g. cm_ContextMenuInternal check 1st assoc. If it matches add its open action and verbs to the context menu (no change).
  • Don't stop here. Check 2nd assoc. and again add its open action and verbs to context menu.
  • As there can be naming conflicts obviously at least for the open action add a postfix if there is more than one matching assoc.
  • This can be new commands or a change to existing commands.
Example. An icon file is to be opened. The following associations have been defined.
  1. Graphic files (Open: PS, Preview: IrfanView)
  2. Office files (Open: LibreOffice)
  3. Icon files (Open IcoFX, Convert to PNG: CnvTool)
  4. Web files (Open: WebEdit, Preview in Chrome: Chrome, Preview in Firefox: Firefox)
The context menu would basically look like this:
Open (Graphic files)
Preview (Graphic files)
Open (Icon files)
Convert to PNG (Icon files)

Another way would be to display the postfix only in case of conflicts:
Open (Graphic files)
Preview
Open (Icon files)
Convert to PNG
User avatar
Stance
Power Member
Power Member
Posts: 1079
Joined: 2005-03-29, 06:26 UTC

Post by *Stance »

Lefteous,
(So far untested)
You can try to define multiple searches that contain the ICO-files.
Your example: Graphic files, Office files, Icon files and Web files.

The searches are saved, according to their order, into the redirected "associations-searches.INI".
In the example above are only Filter1 and Filter2 used, Filter3 and Filter4 are also possible.
It is important to complete with: ALL **.

Preview is handled in the context menu with the Item LISTER (+ addons).

Just a thought...

(Bisher nicht getestet)
Du kannst ausprobieren, mehrere Suchvorgänge zu definieren, die ICO-Dateien enthalten.
Dein Beispiel: Graphic files, Office-files, Icon files und Web-files.

Die Suchläufe werden entsprechend ihrer Reihenfolge in den umgeleiteten "associations-searches.INI" gespeichert.

Im obigen Beispiel werden nur Filter1 und Filter2 verwendet, es sind auch Filter3 und Filter4 möglich.
Wichtig ist es, abzuschliessen mit: ALL**.

Nur so ein Gedanke...
Post Reply