About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Scripting
  Introduction to Aliases
  Introduction to Macros
  Introduction to Variables
  Introduction to Classes
  Introduction to Triggers
  Introduction to Buttons
  Introduction to Multiplaying
  Introduction to Paths
  Introduction to Events
Related Links:
  Feature Summary
Introduction to Multiplaying [[CMUD_MultiplE]] 
If you connect to more than one character or more than one MUD (using the File/New Connection menu command or the Sessions toolbar button), CMUD will put each character into a different window. This allows you to control multiple characters at once (called multiplaying and is banned on many MUDs).

The commands that you type in the command box are sent to the character window that currently has the focus. This is usually the window on top. You can change the currently focused window in several ways: select the window from the list given in the Window menu, or just click on the window caption when more than one window is open. You can also cycle through the open windows using the Ctrl-N or Ctrl-Tab keys.

Each window has a name associated with it. The default name for a window is the ID of your MUD session. You can change this name using the #NAME command, or by renaming the window in the Package Editor.

Multiple Windows

The #WINDOW can be used to create a new window, or to switch to an existing window with a given name. For example, typing:

#WINDOW Zugg

will create a new window called "Zugg". If you add text to the #WINDOW command, the text is displayed in the window (but not executed):

#WINDOW Zugg "Hello Zugg"

will display "Hello Zugg" in the window that we just created. But the keyboard focus will remain in the current window in this case.

To send commands to a different window, precede your command with name: where name is the name of the window you wish to get focus, and : is the focus character (which can be changed in the Preferences). The indicated window will be brought to the top and focused, and the command will be sent to that character. To send a command to a different window without changing the focus, precede your command with :name: where name is the name of the window you want to command sent to. In this case, your current window will be unchanged. To send a command to all windows, use * for the window name, or use the #ALL command.

When referring to windows by name, you don't have to spell out the entire name, just use enough characters to uniquely determine the window. For example, if you have a window named zugg, then typing z:hi is enough to send hi to the zugg window. You can also give a list of window names separated by commas. For example, z,a:hi would send hi to the window starting with 'z' and the window starting with 'a'.

Note that you can also mix these focus commands within your command line. For example, entering zugg:eat;aurora:drink will send the eat command to zugg's window, and the drink command to aurora's window. Aurora's window will have the focus at the end of this. Let's look at some more examples to make this clearer. In all of these examples, assume that we have two windows, Zugg and Aurora, and that Aurora's window currently has focus at the beginning of each example.

eat;zugg:drink
tell aurora (the current window) to eat and zugg to drink. Gives zugg the focus.

zugg:eat;drink
tell zugg to eat and drink and give zugg the focus. Notice that using a window name causes all commands on the same line to go to that window. This only works if all of the commands are on the same line separated by ;. To send multiple lines or scripts to another window, see the #EXECWIN command.

:zugg:eat;drink
tell zugg to eat and drink, don't change focus. Aurora maintains the focus.

zugg:eat;::drink
tell zugg to eat and give him the focus. Then, change the focus back to aurora and tell her to drink. The :: returns focus to the original window.


Finally, you can use tab completion to change window focus without sending any commands to the window. Typing zugg: and pressing <TAB> will give the zugg window focus and bring it to the top. The command buffer will then be cleared, awaiting commands to be sent to this window.

Capturing text and sending it to another window

One of the most common uses of multiple windows is to capture text from the main MUD window and then send it to another window. For example, your main MUD window can often get cluttered with various chat text. If you want to ensure that you never miss a chat command sent to you, you could create this trigger:

#TRIGGER {tells you} {#CAPTURE Tells}

The #CAPTURE command will create the window if it doesn't exist, and will then send the last line received in the main window to the named window. In this example, any line that contains "tells you" will be displayed in the "Tells" window. If you also wanted to remove this line from the main window, then you could add the #GAG command to the trigger.

Window Layout

CMUD will normally try to automatically save your window layout for your session. If you create multiple windows and dock them in some way, CMUD will save this docking layout and restore it the next time you open the session.

However, if you open multiple sessions, CMUD will not save your layout (it doesn't want to overwrite your saved layout for each session). If you want to save the layout of multiple sessions, use the File/Save Session As menu command to create a new "composite" session that will automatically load both sessions that are currently open. This will add a third icon to your session screen that can be used to open both sessions at once and restore the window layout that you are using.

Window Activity

When you have more than one window open, you can use the Tabbed Layout to display each window name in a tab bar. To bring a window to the front, just click on a tab. This is the same as clicking on the window itself, or selecting it from the list in the Window menu.

To the left of the window name in each tab is an activity indicator. When the indicator is an empty circle, that indicates the current window that has focus. Other status indicators include:

red dot session has been disconnected
green dot session has received new text since the last time it was active
yellow dot session has disconnected, but was able to automatically reconnect
yellow bolt session is connecting

 User comments 
Erasmus: Thu May 21, 2009 8:35 pm    

According to the Multiplaying help file under Changes for Zmud users using a partial window name is no longer valid. Those comments should be ignored/deleted.
Viewer Comments [1 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net