Choosing which lister plugin to use in runtime

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

radeknews
Junior Member
Junior Member
Posts: 15
Joined: 2005-10-27, 13:51 UTC
Location: Switzerland

Choosing which lister plugin to use in runtime

Post by *radeknews »

Hello members,

I have checked the TC wiki
( http://www.ghisler.ch/wiki/index.php/Lister_plugins )

I have searched the forum, but I haven't found anything, so I started a new topic.

My question is:

Can I choose IN RUNTIME which lister plugin should be used with a file?
E.g. Whether I want to see a webpage graphically (with ieWebView) or edit the source code in HTML (with SynPlus)?

If so - how? :?:

Thanks
Radek
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Choosing which lister plugin to use in runtime

Post by *Sheepdog »

radeknews wrote: If so - how? :?:
If the file is opened in Lister you should press [4] to cycle through all plugins that are able to display the certain file.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
radeknews
Junior Member
Junior Member
Posts: 15
Joined: 2005-10-27, 13:51 UTC
Location: Switzerland

Re: Choosing which lister plugin to use in runtime

Post by *radeknews »

Sheepdog wrote: If the file is opened in Lister you should press [4] to cycle through all plugins that are able to display the certain file.

sheepdog
Thanks - this is at least something, :roll:
although "cycling" is not very convenient,
especially since many plugins capture the keyboard,
so one has to use the lister menu.

Is there a way to decide in advance which one should be used, like with Alt and Shift keys?

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

Post by *Sheepdog »

Total COmmander Help: Keyboard layout wrote: ALT+F3 Use alternate (external or internal) viewer
ALT+SHIFT+F3 Start Lister and load file with internal viewer (no plugins or multimedia)
SHIFT+F3 List only file under cursor, when multiple files selected
So the only way will be to associate particular filetypes to the external Lister and call it with special ini files. (asoociating within Total Commender at Configuration->Options->Edit/View:Associations). So you could at least use two different plugins: one installed in the wincmd.ini with [F3] and one in the ini for external Lister with [alt]+[F3].

The other thing you can do is to change the order of the plugins in the Lister plugin dialog. Because some plugins do not capture the keybord so you will be able to cycle.

Or you may also use the Choice Editor (pls search in the forum for a link) that will allow you to choose the programs to open a file with. Thus you may use more than one ini file for the external Lister.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
radeknews
Junior Member
Junior Member
Posts: 15
Joined: 2005-10-27, 13:51 UTC
Location: Switzerland

Post by *radeknews »

Thanks Sheepdog,
I've check out that choice editor - quite a smart idea -
if it could use the TC plugins...
Fortuantely, SynPlus comes with an executable though.

I knew about the plugin sequence, but there CAN be NO perfect sequence -
if such a list could be made per extension - then this would work.

I'm experimenting with the whatever+F3 configuration.

What about the quick-view with ctl-Q?
It seems reasonable to use the buit-in viewer -
if you want it to be as quick as possible,
but can I force TC to do that? :?:
It keeps loading the first compatible plugin.

Thank you very much for your help

Radek
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I've check out that choice editor - quite a smart idea -
if it could use the TC plugins...
Fortuantely, SynPlus comes with an executable though.
Well, you can - by installing multiple external listers and set different ini files for them via command line parameters.
Author of Total Commander
https://www.ghisler.com
radeknews
Junior Member
Junior Member
Posts: 15
Joined: 2005-10-27, 13:51 UTC
Location: Switzerland

Post by *radeknews »

ghisler(Author) wrote:Well, you can - by installing multiple external listers and set different ini files for them via command line parameters.
Thank you, but I don't have a clear picture of what should be in that ini file
to get a plugin A or B to work with the external viewer.

First I tried to pass "/I=%Commander_path%\wincmd.ini",
which in my view should copy the internal viewer's behavior -
as a start for further customizations.
That however did not work, i.e. I had the naked lister, no plugins,
so I must have misunderstood something.

Radek
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The standalone lister doesn't support any environment variables, sorry. You can either set an ini file which doesn't yet exist, and then add the plugin you need via the LS-Plugins button in the configuration dialog, or copy wincmd.ini to the new name and then delete the plugins you don't need.
Author of Total Commander
https://www.ghisler.com
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

radeknews wrote:Thank you, but I don't have a clear picture of what should be in that ini file
to get a plugin A or B to work with the external viewer.
Create a file with the following content e.g. named "html.ini"

Code: Select all

[ListerPlugins]
0=%COMMANDER_PATH%\plugins\WLX\ieview.wlx
Put this into the file in the folder of the external lister and associate (within TC, see above post) html with (e.g.)

c:\Totalcmd\Addon\Lister\lister.exe /i=c:\Totalcmd\Addon\Lister\html.ini

That should do the trick to show html-files with ieview plugin.


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
radeknews
Junior Member
Junior Member
Posts: 15
Joined: 2005-10-27, 13:51 UTC
Location: Switzerland

Post by *radeknews »

ghisler(Author) wrote:The standalone lister doesn't support any environment variables, sorry.
Now I see. Thank you.

You see, what I'd like to make the default option for F3 and Ctl+Q should be quick.

Seems like I end up writing my own plugin :? ..

Gruss
Radek
User avatar
Huggy
Junior Member
Junior Member
Posts: 16
Joined: 2004-03-18, 23:08 UTC
Location: Brussels - Belgium

Post by *Huggy »

Hi all,

I was on my way searching for something on the forum and stumbled upon this post which is close to what I am looking for.

I have been using TotalCommander for quite a long time now, but am still discovering new features / tricks every day :)
So maybe I missed this one ;-)

Does there exist a way to see from the Lister window the list of compatible plugins I can choose from ? In other words, can I know among which plugins pushing '4' will cycle and thereby choose dynamically from within lister which one I want to use ?

Thanks !

Stéphane

P.S. If that is possible, the suggestion I had was to add a dynamic menu listing the compatible viewers and allowing the user to choose ...
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Huggy,
Does there exist a way to see from the Lister window the list of compatible plugins I can choose from ? In other words, can I know among which plugins pushing '4' will cycle and thereby choose dynamically from within lister which one I want to use ?
No, no at the moment. But nice idea. Support++.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Hacker
I guess it's hard to implement: because Lister knows, is plugin suitable for given file, only after trying to load that plugin. If plugin function ListLoad returns OK then plugin can work, if file is broken or extension is wrong ListLoad returns ERROR and plugin cannot work with this file...

You can built only list of pluging that have detect-string matching to file. But that's not final list.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Alextp,
I guess it's hard to implement: because Lister knows, is plugin suitable for given file, only after trying to load that plugin.
Yes, I know, and I don't see a problem in that.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2Hacker
We need to hear Ghisler: can he implement it?
(I don't think he can...)
Post Reply