Support executing commands with parameters as EM-commands via WM_COPYDATA

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8467
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Support executing commands with parameters as EM-commands via WM_COPYDATA

Post by *MVV »

TC has different kinds of commands:
1. Numbered CM-commands w/o parameters. May be executed either via WM_USER + 51 message or via WM_COPYDATA as EM-commands.
2. Named EM-commands. May be executed via WM_COPYDATA with "EM" data tag.
3. Named commands with parameters (like OPENTABS, CD, OPENBAR, LOADSEARCH in separate group of command browser). May not be executed neither via WM_USER + 51 nor via WM_COPYDATA message (*).
4. Numbered CM-commands that support optional parameter string. May be executed via WM_USER + 51 message with numeric parameter, or via WM_COPYDATA as EM-commands with any parameter.

* Most named commands may be executed via a wrapper EM-command with %A parameter, like em_MultiRename with MULTIRENAME command and %A parameter, or em_OpenTabs with OPENTABS command and %A parameter and even (surprisingly) em_PanelWidth command with cm_100percent command and %A (it really accepts %A parameter though TC interface blocks parameter field for any CM-command so manual usercmd.ini editing is needed). This way is not usable because it requires a wrapper command for every command with parameter.

Please make parametrized commands working in TC 9.50 just via WM_COPYDATA with "EM" data tag call, i.e. process them like EM-commands, it should be quite easy to fix since TC already has a code that parses buttonbar commands. It isn't portable and useful to create a wrapper command per every command with parameters.

Some examples of executing commands via TCFS2:

Code: Select all

TCFS2.exe /ef tem(`em_OpenTabs D:\1.tab`)
TCFS2.exe /ef tem(`em_OpenBar D:\1.bar`)
TCFS2.exe /ef tem(`em_MultiRename MyTemplate`)
TCFS2.exe /ef tem(`em_SelectFiles *.ini`)
TCFS2.exe /ef tem(`em_PanelWidth 88`)
TCFS2.exe /ef tem(`cm_100percent 88`)
TCFS2.exe /ef tem(`cm_GoToFirstFile 10`)

It would be much easier to be able to execute such commands directly (currently not possible)!

Code: Select all

TCFS2.exe /ef tem(`OPENTABS D:\1.tab`)
TCFS2.exe /ef tem(`OPENBAR D:\1.bar`)
TCFS2.exe /ef tem(`MULTIRENAME MyTemplate`)
TCFS2.exe /ef tem(`SELECTFILES *.ini`)
PS. Perhaps it would also be nice not to block parameter field for commands that may have parameters because there are such CM-commands (cm_Wait, cm_Select, cm_Reverse, cm_GoToFirstFile, cm_SrcViewModeList, cm_LeftViewModeList, cm_RightViewModeList, cm_100percent, cm_VerticalPanels, cm_*ByName etc).

User avatar
dindog
Senior Member
Senior Member
Posts: 277
Joined: 2010-10-18, 07:41 UTC

Re: Support executing commands with parameters as EM-commands via WM_COPYDATA

Post by *dindog »

I would be nice to have, also should allow parameters for multi command like: cd c:\,cm_wait 500,cm_select 1000, it's impossible to have this sequence command without help of outside tools like tcfs2

User avatar
MVV
Power Member
Power Member
Posts: 8467
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Support executing commands with parameters as EM-commands via WM_COPYDATA

Post by *MVV »

Multi-commands is a separate feature that is quite limited due to a command separator that may appear in a command parameter... It needs some way to enclose parameters in order to allow them.

Post Reply