world.SetCommand

MUSHclient script function (Method)

Sends text to the command window

Prototype

long SetCommand(BSTR Message);

Data type meanings

Description

This lets you send text to the command window. It will only act if the command window is currently empty (to avoid wiping out something you are typing).

Because of this you cannot test "setcommand" by typing it into the command window, because by definition, the command window will not be empty (it will have the "setcommand" in it). You must do it from a script, or an immediate window.

VBscript example

world.SetCommand "think Here is another command"

Jscript example

world.SetCommand("think Here is another command");

PerlScript example

$world->SetCommand("think Here is another command");

Python example

world.SetCommand("think Here is another command")

Lua example

SetCommand ("think Here is another command")

Return value

eCommandNotEmpty : Command area was not empty
eOK: Set OK

Return code meanings

Related topic

Sending to the world

See also

FunctionDescription
NoteSends a note to the output window
PasteCommandPastes text into the command window, replacing the current selection
SendSends a message to the MUD
SetCommandSelectionSelects specified columns in the command window