Read about scripting
Executes a command as if you had typed it into the command window
View list of data type meanings
long Execute(BSTR Command);
The Execute function lets you execute arbitrary commands as if they were typed into the command window.
The command will be parsed exactly the same as the command window parser, depending on currently-set options (eg. speedwalking, command stacking, scripting etc.).
The only difference is that the command will:
* Not be placed in the command history (as you didn't actually type it in)
* Not unpause the output window if it is paused
There is a possibility that you might accidentally nest calls to execute, for example if an alias called itself, so MUSHclient limits nested calls to the Execute function to 20 levels of nesting.
Note that the Execute function ignores the auto-say setting. Thus you can still use Execute to do things, even if the player has turned on auto-say for a quick chat. However if you are planning to do script commands you will need to be sure that the scripting prefix has not changed.
If you are planning to execute a script using Execute you should probably find the current script prefix (using world.GetOption) rather than relying it on being the same all the time.
Available in MUSHclient version 3.35 onwards.
world.Execute "north" ' normal command
world.Execute "#4s 3e" ' speed walk
world.Execute "/world.Debug ""colours "" " ' execute a script
world.Execute ("north"); // normal command
world.Execute ("4s 3e"); // speed walk
world.Execute ("/world.Debug ("colours ") "); // execute a script
$world->Execute ("north"); # normal command
$world->Execute ("4s 3e"); # speed walk
world.Execute ("north") # normal command
world.Execute ("4s 3e") # speed walk
world.Execute ("world.Debug ("colours ") ") # execute a script
Execute ("north") -- normal command
Execute ("4s 3e") -- speed walk
Execute ("/Debug ('colours') ") -- execute a script
View list of return code meanings
eOK: Executed OK
eWorldClosed: World is closed
eCommandsNestedTooDeeply: Commands nested too deeply
See Also ...
(Send) Sends a message to the MUD
(Help topic: function=Execute)