(updated August 2005)
Mesquite scripts, if stored in files in the appropriate places in the mesquite directory, are accessible from menus while Mesquite is running. They are therefore generally available as macros.
Eventually, we imagine that such macros could appear throughout Mesquite's menus as if they were alternatives to modules and other commands. At the moment, however, they appear in only a few places in the menu:
Currently available macros can be seen in the Macros submenu of the File menu.
A macro indicates to what it applies by a "telling" command at its start. For instance, a macro that is intended to command a Tree Window (and which therefore should appear when the Tree Window is in front), should begin either with the line:
telling TreeWindowMaker;
or with the line
telling BasicTreeWindowMaker;
The latter is a subclass of the former.
Here is a simple macro that is available when the tree window is in front. It brings up a mirror tree window and traces two characters, one left and one right:
telling TreeWindowMaker;
getWindow;
tell It;
newWindowAssistant #MirrorTreeWindowMaker;
tell It;
getWindow;
tell It;
newAssistantLeft #TraceCharacterHistory;
tell It;
setHistorySource #RecAncestralStates;
tell It;
setMethod #ParsAncestralStates;
endTell;
setCharacter 1;
endTell;
newAssistantRight #TraceCharacterHistory;
tell It;
setHistorySource #RecAncestralStates;
tell It;
setMethod #ParsAncestralStates;
endTell;
setCharacter 2;
endTell;
showWindow;
endTell;
endTell;
endTell;
Because of the availability of varying querying commands (see the Scripting Commands page available from the Help menu while Mesquite is running), macros can query the user for information as they are being executed.
A macro file, to be found by Mesquite, must occur in a directory called "macros" somewhere within the mesquite directory. If the macros directory is within a folder named "lib" or "duties" or "docs" or "documentation", it won't be found. It may be within a folder for one of the installed packages.