[..] QuoteEmptyStrings %S %R %M %N (etc)

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

[..] QuoteEmptyStrings %S %R %M %N (etc)

Post by *Balderstrom »

When the cursor is on [..] TC will send NUL, Nothing.
Which has been discussed in a few places for various issues, at least one of the problems is with TCMenu.exe which chokes when it receives nothing instead of an expected string.

The workaround thus far has been to write a user defined command for each of these commands. Which works, but is messy - I have accumulated many em_commands for this one issue alone.

Proposed Feature:
When an empty string would be sent, TC could quote it instead: ""
This could be stored in the IconicX setting in the Button.bar's -- which currently uses '1' for Run Minimized, and '-1' for Run Maximized. This setting could be a binary sum like TC's other settings.
1 = Run Minimized
2 = QuoteEmptyStrings
-1 = Run Maximized
-2 = QuoteEmpty Strings

3 = QuoteEmptyStrings & Run Minimized.
-3 = QuoteEmptyStrings & Run Maximized.
Originally I thought of a wincmd.ini setting, but that would globally affect all buttons, and might cause issues with programs that don't understand quoted empty strings like cmd.exe does. i.e. IF "%~1" == ""
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that the file list is often combined with other parameters, e.g. someprogram.exe /Files %S
or so. If %S is empty, it's not clear how someprogram.exe would react. Storing that in the uconx setting isn't such a good idea, but maybe it could be solved via some kind of extra parameter %something?
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Or some kind of parameter like "%x" and "%X".
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

The %Letters are getting kinda Full :-)

I was almost thinking it might be time to consider a new format %Word.
Or a slight change in format:
%S|""
%P|%CD%
If the First Arg before an "|" is empty, send the 2nd.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

No problem there are 26 left:

Code: Select all

abcghijkquvwyz
 BCGHIJKQUVWY
:wink:
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Suppose %Q makes sense in this area then.
%Q%S

Though the %S|"", %P|%CD% is more functional without needing additional modifiers for each one.
Post Reply