Page 1 of 1

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

Posted: 2009-09-25, 17:56 UTC
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" == ""

Posted: 2009-09-25, 19:06 UTC
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?

Posted: 2009-09-25, 19:10 UTC
by Samuel
Or some kind of parameter like "%x" and "%X".

Posted: 2009-09-25, 19:14 UTC
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.

Posted: 2009-09-25, 19:19 UTC
by Samuel
No problem there are 26 left:

Code: Select all

abcghijkquvwyz
 BCGHIJKQUVWY
:wink:

Posted: 2009-09-25, 19:33 UTC
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.