world.GetQueue

MUSHclient script function (Method) — introduced in version 3.18

Returns a variant array which is a list of queued commands

Prototype

VARIANT GetQueue();

Data type meanings

Description

Returns an array of the currently queued commands (speedwalks etc.).

You might use this if you needed to do something urgently. Retrieve the queue into an array, discard the queue, and then requeue it.

VBscript example

dim speedwalkQueue

  speedwalkQueue = world.GetQueue

  If Not IsEmpty (speedwalkQueue) Then
    For Each sw In speedwalkQueue 
       world.note sw
    Next

  End If

Jscript example

commandList = new VBArray(world.GetQueue()).toArray();

 if (commandList) 
   for (i = 0; i < commandList.length; i++)
       world.note (commandList [i]);

PerlScript example

foreach $item (Win32::OLE::in ($world->GetQueue ()))
 {
 $world->note($item);
 }

Python example

commandList = world.GetQueue
if (commandList):
  for c in commandList : world.Note (c)

Lua example

for k, v in pairs (GetQueue()) do 
  Note (v) 
end

Return value

If there are no commands in the queue then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing all queued commands. Use "ubound" to find the number of commands in the list.

Related topic

Information

See also

FunctionDescription
DiscardQueueDiscards the speed walk queue
QueueQueues a command for sending at the "speed walk" rate.
SpeedWalkDelayThe number of milliseconds delay between speed walk commands