Custom Mouse Strings
The following parameters can be included in the mouse strings that are sent
when a button is pressed:
%c Output the column in which the mouse was clicked. The leftmost column is 1.
Clicking in the 70th column will produce 70.
%C Output the column in which the mouse was clicked, but in binary format. The
leftmost column is 1. Clicking in the 65th column will appear to return an
uppercase A (subject to code page variations) because A is the 65th character.
%r The same as %c, but outputs the row.
%R The same as %C, but outputs the row.
%x Output the column in which the terminal emulation cursor currently resides.
The leftmost column is 1. If the cursor is in the 70th column, this parameter
will produce 70.
%X Output the column in which the cursor currently resides, but in binary format.
The leftmost column is 1. If the cursor is in the 65th column, this parameter
will appear produce an uppercase A (subject to code page variations) because A is the 65th character.
%y The same as %x, but outputs the row.
%Y The same as %X, but outputs the row.
%s This parameter will produce the text that is currently selected (highlighted)
on the emulator. This does not perform a Windows copy.
%a This will print the binary value of the character that the mouse was clicked
over. If you clicked on an A, this will produce 65.
%t This will print the TCS value of the character that mouse was clicked on.
%T The same as %t, but prints the value as hexadecimal digits.
%b This will print the numeric value of the attribute of the character the mouse
was clicked over. For information about attribute values, see the script
language documentation.
%B The same as %b, but prints the value as hexadecimal digits.
%o This will cause a Windows copy of the currently selected (highlighted)
emulator text.
%p This will cause the current Windows clipboard text selection to be pasted at
the cursor location.
%<
> This will cause a specific TCS character to be output. %<ESC> will cause an
Escape to be sent, %<AF1> will cause an ALT-F1 to be sent, and so forth.
In addition to these basic format parameters, additional arguments to most of
these can be passed between the % and the format letter.
For Numeric Parameters
For numeric (not binary) results, a number may be passed between the % and
format character. For this section x will be used in the examples, but this may be replaced with any of the
numeric parameters (a list follows.) The possible combinations are %nx, %.nx and %0nx.
%nx: This will cause the output to be at least the number of characters specified.
The output is left padded with spaces. For example, if %2x was used, and the cursor was in the 1st column, a space and then a 1 would be
output. If the number of characters to be output is greater than the argument
passed, the argument is ignored and all the characters are output.
%.nx and %0nx: This will cause the output to be at least the number of characters specified.
The output is left padded with zeros. For example, if %.3x was used, and the cursor is in the 20th column, 020 will be output. If the number of characters to be output is greater than the
argument passed, the argument is ignored and all the characters are output.
The numeric parameters are: %c, %r, %x, %y, %a, %t, %T, %b and %B.
For Text String Parameters
For text results, a number may be passed between the % and the format
character. For this section p will be used in the examples, but this may be replaced with any of the string
parameters (a list follows). The possible combinations are %np and %.np.
%np: This will cause the string output to be at least the number of characters
specified. The output is left padded with spaces. For example, if %.3x was used, and the resulting string was to, to would be returned. If the number n is preceded with a (dash), the output is right padded with spaces. If the number of characters to
be output is greater than the argument passed, all characters are output.
%.np: This will cause the string output to be limited to the number of characters
specified. If the number of characters to be output is greater than the argument
passed, the extra characters on the right are truncated. If the number n is preceded with a (dash), the output is truncated from the left instead. For example, if %.3x were used, and the resulting string would be from, fro would be returned. However, if %.-3x were used, from would return rom.
The text string parameters are: %p and %s.