- Jun
- 568
- 4
I just noticed something that is not right with the variable
It clears the command line and then echos the text selected in the tab window with unquoted text to be quoted. In the following, I created a line of quoted text, selected it, and then used my TEST button. Note the funny thing that happened with the selected text. The quotation marks got messed up, and spaces in the text were removed.
There should have been no problem; the command works fine if the text is entered manually.
It appears that some processing is being done on the contents of
Even if the variable is defined,
However, if I select %_ip in the TCC window, its value is stored in
I just launched Take Command 27, and the behavior seems to be the same there. I guess it is something I just never tripped over before.
P. S. Rex, I just noticed that in version 30, %_ip returns a string with a leading space, which it did not do in version 27.
Was that intentional?
_selected
for use in toolbar buttons. To illustrate the problem, I have created a button labeled TEST with the following command to be sent to the current tab:esc "echo %%@quote[%_selected]" enter
It clears the command line and then echos the text selected in the tab window with unquoted text to be quoted. In the following, I created a line of quoted text, selected it, and then used my TEST button. Note the funny thing that happened with the selected text. The quotation marks got messed up, and spaces in the text were removed.
TCC(30.00.22): C:\>echo "this is a test"
"this is a test"
TCC(30.00.22): C:\>echo %@quote[thisisatest"]"
TCC: Syntax error "@quote[thisisatest"]""
There should have been no problem; the command works fine if the text is entered manually.
TCC(30.00.22): C:\>echo %@quote["this is a test"]
"this is a test"
It appears that some processing is being done on the contents of
_selected
before it is put into the command line. Another way to see this is to select some text that contains a percent sign. Variable expansion seems to be performed on the selected text before _selected
is set.TCC(30.00.22): C:\>echo `%junkvar`
%junkvar
TCC(30.00.22): C:\>echo %@quote[]
ECHO is OFF
Even if the variable is defined,
_selected
seems to get nothing.TCC(30.00.22): C:\>set junkvar
value of junkvar
TCC(30.00.22): C:\>echo %@quote[]
ECHO is OFF
However, if I select %_ip in the TCC window, its value is stored in
_selected
.TCC(30.00.22): C:\>echo `%_ip` = %_ip
%_ip = 192.168.1.9
TCC(30.00.22): C:\>echo %@quote[ 192.168.1.9]
" 192.168.1.9"
I just launched Take Command 27, and the behavior seems to be the same there. I guess it is something I just never tripped over before.
TCC(27.01.24): C:\>echo "this is a test"
"this is a test"
TCC(27.01.24): C:\>echo %@quote[thisisatest"]"
TCC: Syntax error "@quote[thisisatest"]""
P. S. Rex, I just noticed that in version 30, %_ip returns a string with a leading space, which it did not do in version 27.
TCC(27.01.24): C:\>echo "%_ip"
"192.168.1.9"
TCC(30.00.22): C:\>echo "%_ip"
" 192.168.1.9"
Was that intentional?