[Home] [Downloads] [Search] [Help/forum]

SetCommand

Script function

world.SetCommand

Read about scripting

Type

Method

Summary

Sends text to the command window

Prototype

long SetCommand(BSTR Message);

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

View list of return code meanings

See Also ...

Topics

Commented softcode
Sending to the world

Functions

(Note) Sends a note to the output window
(PasteCommand) Pastes text into the command window, replacing the current selection
(Send) Sends a message to the MUD
(SendImmediate) Sends a message to the MUD immediately, bypassing the speedwalk queue
(SendNoEcho) Sends a message to the MUD without echoing in the output window
(SendPkt) Sends a low-level packet of data to the MUD
(SendPush) Sends a message to the MUD and saves it in the command history buffer
(SendSpecial) Sends a message to the MUD with various options
(SetCommandSelection) Selects specified columns in the command window

(Help topic: function=SetCommand)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]