Code: Select all
TOTALCMD#BAR#DATA
cm_Edit
/CGL0T="%P" /N="test.txt"
wcmicon2.dll,62
-1
It's the same with a space in the file name.
The same thing happens with cm_EditNewFile 1.
GIF
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
TOTALCMD#BAR#DATA
cm_Edit
/CGL0T="%P" /N="test.txt"
wcmicon2.dll,62
-1
It's enough that it contains one file (preferably non-zero).ghisler(Author) wrote: 2024-08-18, 08:39 UTC What does "C:\te st\" contain when you press the button? And where is the cursor?
Are you sure? I have been using codes without specifying -1 for many years, and the parameters have never been ignored. This is the first time I've ever heard of such a thing.I only noticed that the parameter is ignored when adding the button via your TOTALCMD#BAR#DATA, but this happens because you didn't include all lines (the -1 at the end is important).
I didn't even imagine that for such a trifle you need to reopen TC. As a last resort, I perform cm_ReloadBarIcons through hotkey, but I have never needed it for this either.After closing and re-opening TC, the button works fine here with paths both with and without spaces in the name.
Apparently, this happens with an internal command, all parameters of which are specified in the "Parameters:" line.This is the first time I've ever heard of such a thing.
If this is a bug, then where to see the rule, where should the cursor move?Do you have any thoughts on the topic of moving the cursor?
And how can the presence or absence of a space change something in the author's potential idea?If this is a bug, then where to see the rule, where should the cursor move?
Note the -1 at the end! This is the code of the command. Normally it would be the value 904 of cm_edit (which saves TC a lookup when you click on the button), but here you can't use the code because there are parameters to be taken into account.TOTALCMD#BAR#DATA
cm_Edit
/CGL0T="%P" /N="test.txt"
wcmicon2.dll,62
-1
Fla$her sees a problem only in the fact that the cursor does not move to the created file.Anyway, this does not explain why Fla$her gets different results when a path contains spaces.
Do you want me to record a screencast that demonstrates that the button will work immediately without -1?ghisler(Author) wrote: 2024-08-21, 07:06 UTC Now when you paste the command without the -1, TC sees cm_Edit and converts it to 904 internally. Therefore the parameter is ignored when you click the button.
Have you tried the second command from the first post? Execute cm_EditNewFile 1 directly from the command line and set any nonexistent name with or without a space. In one case, the cursor remains in place, in the other it is moved to a new file. Do you deny it?
as for me - in both cases cursor here DOES move on a new file record in the file panelExecute cm_EditNewFile 1 directly from the command line and set any nonexistent name with or without a space.
See the tooltip in the example. It will help you understand why you have an error.AntonyD wrote: 2024-08-21, 08:41 UTC Because I, for example, only get an error message that the file was not found.
TC x32 and/or x64?AntonyD wrote: 2024-08-21, 08:41 UTC as for me - in both cases cursor here DOES move on a new file record in the file panel![]()