SetCommand
Script function

world.SetCommand

DOC_scripting Read about scripting

Type

Method

Summary

Sends text to the command window

Prototype

long SetCommand(BSTR Message);

DOC_data_types View list of 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


DOC_errors View list of return code meanings


See Also ...

Topics

DOC_send_paste Commented softcode
DOC_send Sending to the world

Functions

FNC_Note Note (Sends a note to the output window)
FNC_PasteCommand PasteCommand (Pastes text into the command window, replacing the current selection)
FNC_Send Send (Sends a message to the MUD)
FNC_SendImmediate SendImmediate (Sends a message to the MUD immediately, bypassing the speedwalk queue)
FNC_SendNoEcho SendNoEcho (Sends a message to the MUD without echoing in the output window)
FNC_SendPkt SendPkt (Sends a low-level packet of data to the MUD)
FNC_SendPush SendPush (Sends a message to the MUD and saves it in the command history buffer)

(Help topic: function=SetCommand)

DOC_contents Documentation contents page