MESSAGES [no parameters]
by Matt Deatherage

Messages places information about a Tool Locator MessageCenter "files" message
(a message of type 1) into several shell variables.  You can use messages in
your login script to manage files opened from the Finder or other program
selectors.

The variables are:
* echo {MsgAction} {MsgFT} {MsgAT} {MsgPath} {MsgStamp} {MsgPrefix}

{MsgAction} is "Open", "Print", or a 5-character decimal string representing
other message actions.  For example, action $0003 would be "    3".

{MsgFT} is the file type of the first file in the message (usually $B0, SRC).

{MsgAT} is the auxiliary type of the first file in the message.  This is the
APW language number.

{MsgPath} is the pathname of the first file in the message, exactly as in the
message itself.  It is not expanded or processed.

{MsgStamp} contains the language name for the first file in the message, such
as "REZ" or "ASM65816".  This variable will only be set if you are using
version 1.1 or greater of the APW/ORCA shell.

{MsgPrefix} contains a the full, expanded pathname of the first file in the
message without the file name.  You can pass this as the argument to "prefix"
to set the directory to that of the file in the message.

Here's a script example using both MESSAGES and MODIFIERS.  This is my actual
login script.

asm65816
alias e edit
alias cd prefix
echo you have the following aliases:
alias
messages
if {MsgAction} == "None"
    modifiers
    If {Option} == "1"
             echo "Setting prefix to 'SA'"
             cd /hd/apw/sa
    end
    If {OpenApple} == "1"
             echo "Launching Prizm..."
             prizm
             modifiers
             if {OpenApple} =="1"
                Echo "Quitting to Finder..."
                quit
             end
    end
else
    prefix {MsgPrefix}
    if {MsgAction} == "Print"
         print {MsgPath}
    else if {MsgStamp} == "EXEC"
         execute {MsgPath}
    else
         edit {MsgPath}
    end
end
