MUSHclient version 2.16.10
--------------------------

Released: Wednesday, 14 June 2000


CHANGES

1. Removed undocumented and confusing feature that pressing Ctrl+M when the notepad was active would *maximize* the window, whereas when a world window was active Ctrl+M would *minimize* MUSHclient.

2. Changed problem in triggers where if you had escape sequences in the *matching text* then they would also be converted. Eg, if you matched on a line with \n\n in it, the \n 's would be converted to linefeeds. Now, the conversion only takes place on what is in the trigger "send" box, not the *contents* of any %0, %1, %2 and so on.

3. New trigger option: Append to Notepad. This allows trigger contents to be *appended* to an existing notepad window of the same title. The title of the window will be:

  Trigger: <trigger label>

If the window does not exist it will be created. Triggers with no label will append to the window titled "Trigger: ".

This allows you to do things like gather MOO editing commands into one window. Also, you an use it as an ersatz logging facility (eg. logging to multiple files at once). You can also use it to implement a frequently-requested feature, namely the ability to redirect some lines to different windows. (eg. OOC pages could be sent to a different window, by using "append to notepad" in conjunction with "omit from output").

Note however, the notepad windows are just simple Windows "edit" controls. They are not like the MUSHclient main output window, which can hold hundreds of thousands of lines of text with little or no performance degredation. The notepad windows will slow down if they get very large. As a guideline, the notepad can comfortably hold around 32K of data, which translates to about 400 X 80-character lines.

4. New script routines:

   world.SendToNotepad title, contents
   world.AppendToNotepad title, contents
   world.ActivateNotepad title
   world.Activate

   These are for creating/appending to notepad windows from a script.

   eg.  /world.SendToNotepad "Nick's window", "Hello, world"

   The contents are copied "as is" without a trailing newline. If you want a newline you will need to add it yourself. The built-in constant "vbcrlf" can be used for this purpose, eg.

   eg.  /world.AppendToNotepad "Nick's window", "More stuff" + vbcrlf

   The function "AppendToNotepad" does not activate (bring to the front) the notepad window. However the function "ActivateNotepad" can be used to do that.

   You can use world.activate to activate the world itself (eg. you might want to do that after creating a notepad window).

5. New menu item on the Window Menu: Close all notepad windows

   This is for when you get into a mess with your triggers or scripts and find hundreds of notepad windows open. You can use this to close all of them. You will be asked to save any changes, where applicable.

6. New option in the scripting configuration - edit scripts with the inbuilt editor. As we now have an editor, we may as well have the option to use it for editing our script files.

7. Sort-of fixed the problem with full-screen mode, when you have the world windows maximized. Previously, after leaving full-screen mode you would get extra "system" menus (and maximize/minimize/close buttons), one set for every time you went in and out of full-screen mode. Now there is a slight flicker while the program "works around" the problem by temporarily un-maximizing the window, going into full-screen mode, and then re-maximizing it. If anyone has a better solution (ie. C++ code) please let me know.

8. As interim documentation, there is now a file in the download, "accelerators.txt" which summarises the keyboard equivalents of various commands.

9. For scripting gurus, who have been asking for access to other worlds, there are two new script functions:
    
    world.GetWorldList 
    world.GetWorld (name)

GetWorldList returns a variant array which is a list of all open worlds. 
GetWorld returns an object which can be used to refer to another world.

eg.

' --------------------------------------------
' Example showing iterating through all worlds
' --------------------------------------------
sub ShowWorlds 

  dim mylist
  dim i

  mylist = world.GetWorldList

  if not IsEmpty (mylist) then
    for i = lbound (mylist) to ubound (mylist)
      world.note mylist (i)
  next
  End If

end sub

' --------------------------------------------------
' Example showing sending a message to another world
' --------------------------------------------------

sub SendToWorld (name, message)
dim otherworld

  set otherworld = world.getworld (name)

  if otherworld is nothing then
    world.note "World " + name + " is not open"
    exit sub
  end if

  otherworld.send message

end sub


A simpler example, if you already know the world name, is:

/set otherworld = world.getworld ("test world")
/otherworld.note "hi there"

You should be very cautious about storing the object reference of the world in a global variable, because if the world is closed then that reference becomes invalid, which will very likely lead to an access violation. You are better off using "world.getworld (name)" every time you need to get a reference to the world, and checking if it "is nothing" as in the example above.

You could use a small variation on the examples above to write your own "send to all worlds" or something similar.

The example files "exampscript.vbs" (VBscript) and "exampscript.jvs" (JScript) have been updated with these examples.

