[REQ] Add cm_LoadBar command...

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

[REQ] Add cm_LoadBar command...

Post by *icfu »

...that would be nice.

Icfu
This account is for sale
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

maybe you want to describe what should happen when the executes this command...
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

cm_LoadBar should load a bar, the same that happens when you press a button which loads a bar.

cm_LoadBar <path>MyCoolBar.bar

An equivalent to cm_List <path>MyCoolFile.ext.

Icfu
This account is for sale
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Well normally cm commands do not support parameters. Alternatives could be support for loading bar files directly in a user command or a LOAD_BAR command which supports parameters.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

cm_list supports a filename, and it can also be used in an em_command. Indeed I have in mind to use such a command by creating an em_command and then sending it with WM_COPYDATA, but that's just a side note.

Edit:
Real (instead of hardcoded) parameter support like in the UPPERCASE commands are not really needed here but if it can be done, why not.

Important for me in this case is the scripting ability of that command. I don't know how to script commands like OPENTABS for example. Is it possible?

Icfu
This account is for sale
ped
Junior Member
Junior Member
Posts: 12
Joined: 2005-10-14, 18:10 UTC
Location: Århus, Denmark

Post by *ped »

Hmm... how do you supply a parameter to cm_list? No matter what I try, it always lists the file under the cursor.

Thanks in advance.
User avatar
nsp
Power Member
Power Member
Posts: 1812
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

icfu wrote:cm_list supports a filename, and it can also be used in an em_command. Indeed I have in mind to use such a command by creating an em_command and then sending it with WM_COPYDATA, but that's just a side note.
I'm curious on how you do this !!!!! Using the lister directly from command line is not fancy enough ;)
icfu wrote:Important for me in this case is the scripting ability of that command. I don't know how to script commands like OPENTABS for example. Is it possible?

Icfu
I use OPENTABS with an em_loadtabs command OPENTABS with %A as parameter..
As you stated with the WM_COPYDATA and the E+256 * M (dwData, the lpData point to a "em_loadtabs c:\\TC\\saved_tabs\\tabs.tab" string.

I just miss the SAVETABS.... COMPAREFILES .....

For loading Bar, you can use Vochomurka powerpro scripts....
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

how do you supply a parameter to cm_list?
The parmeter must follow immediately after cm_list and a space, e.g.

cm_list c:\windows\wincmd.ini
Author of Total Commander
https://www.ghisler.com
User avatar
nsp
Power Member
Power Member
Posts: 1812
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

ghisler(Author) wrote:The parmeter must follow immediately after cm_list and a space, e.g.

Code: Select all

cm_list c:\windows\wincmd.ini
Yes but it is not working with a parameter section... It cannot be used from the command line bar.....

It is annoying not having a coherent command syntax across buttons, command line bar, and em_commands !
ped
Junior Member
Junior Member
Posts: 12
Joined: 2005-10-14, 18:10 UTC
Location: Århus, Denmark

Post by *ped »

I have to agree.

Anyway, I would be happy if I could only use cm_list with parameters that are not hardcoded -- e.g. type 'cm_list myfile.ext' in the command line or (even more important to me) use it with the WM_COPYDATA message.
User avatar
petermad
Power Member
Power Member
Posts: 14812
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

It cannot be used from the command line bar
e.g. type 'cm_list myfile.ext' in the command line
It works fine here from the command line!
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
ped
Junior Member
Junior Member
Posts: 12
Joined: 2005-10-14, 18:10 UTC
Location: Århus, Denmark

Post by *ped »

That's really odd :? I can only make it list the file that the cursor is currently placed on. It does this no matter what file I give as parameter to the cm_list command -- using beta 2 here.

Could you please try to list a file that is not even shown in the current window, using the 'cm_list myfile.ext' (obviously with full path) in the command line?
User avatar
petermad
Power Member
Power Member
Posts: 14812
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2ped
Ahh, sorry my mistake. I had copied the filename to the command line with Ctrl+Enter and hadn't moved the cursor away from the file afterwards. :oops:
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
ped
Junior Member
Junior Member
Posts: 12
Joined: 2005-10-14, 18:10 UTC
Location: Århus, Denmark

Post by *ped »

Ah, I see.

If only Icfu or Ghisler would explain how they make it work....
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's meant for the button bar, e.g. to open a fixed file name in lister. To open a file from the file list itself, you need to put the cursor on it and press F3.

What you can do is define a new user command, e.g. em_list or just em_l which just contains cm_list as the command. This extended command will then also work on the command line with parameters.
Author of Total Commander
https://www.ghisler.com
Post Reply