Description of MUSHclient world function: world.SetCommandSelection
||Selects specified columns in the command window
long SetCommandSelection(long First, long Last);
View list of data type meanings
Lets you select text in the command window. This is intended for specialized applications like a spell checker where, after finding a spelling mistake, you select the misspelt word.
First - the first character to select (1-relative), so the first character is 1.
If "First" is zero, then any selection is removed.
Last - the last character to select (1-relative).
If "Last" is -1 then the rest of the line is selected.
Thus, to select everything, make First = 1 and Last = -1.
To put the cursor between characters, specify them backwards. See the example below.
SetCommandSelection (2, 4) --> select characters 2 to 4
SetCommandSelection (0, 0) --> select nothing
SetCommandSelection (1, -1) --> select everything
SetCommandSelection (10, -1) --> select column 10 onwards
SetCommandSelection (6, 5) --> put the cursor between column 5 and column 6
If you want to *get* the current selection in the command window, use GetInfo(236) (first character) and GetInfo(237) (last character).
Note: Available in version 4.38 onwards.
SetCommandSelection 2, 4
world.SetCommandSelection (2, 4);
$world->SetCommandSelection (2, 4);
world.SetCommandSelection (2, 4)
SetCommandSelection (2, 4)
eOK: Set OK
View list of return code meanings
|Introduced in version
See also ...
||Sends a note to the output window
||Pastes text into the command window, replacing the current selection
||Sends a message to the MUD
||Sends text to the command window
Search for script function
Enter a word or phrase in the box below to narrow the list down to those that match.
The function name, prototype, summary, and description are searched.
Leave blank to show all functions.
Many functions return a "code" which indicates the success or otherwise
of the function.
view a list of the return codes
The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).
view a list of the data types used in function prototypes
View all functions
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )