[Contents] [Index] [Help] [Browse <] [Browse >]
Command/Port Options
********************

   * COMMAND - if given, the command will be executed whenever the
     object is triggered (specific trigger is defined by the object
     type).  The command will be issued to the host port specified by
     the PORT argument.  Note that the command is run asyncronously (as
     a detached process) and only inherits the global path if `MUIRexx'
     is started from a shell.  The command text may contain a format
     specifier (`%s') in which case before issuing the command the
     format specifier will be replaced by a label whose content is
     dependant on the object type.

   * PORT - a specific host port may be specified by this argument.  The
     defined command will be issued to this port whenever the object is
     triggered.  If the port is defined as COMMAND then the command will
     be issued to a DOS shell (global path will be in affect only if
     `MUIRexx' was run from a shell).  If this argument is not given
     but a command is defined then the port will be defined as the port
     for `ARexx' (i.e.  it will be assumed that the command is an
     `ARexx' script).  Additionally, if the port is defined as INLINE
     then the command string will be treated as an inline `ARexx' macro
     string. Note also, that the port may be defined as the port of the
     application itself.  In this manner objects within an application
     can be linked as well as to objects in other applications.

   Many examples are given in the command reference section, however,
here are a few examples illustrating the use of the INLINE port option
(note that each line within the string macros must be terminated with a
semicolon).

     callhook ID VUP ATTRS MUIA_Timer MUIV_EveryTime PORT INLINE,
         COMMAND """options results;
                    address example;
                    gauge ID VGAUG ATTRS "MUIA_Gauge_Current";
                    gauge ID VGAUG ATTRS "MUIA_Gauge_Current" result+5;"""
     
     callhook ID LST2 INCLUDE "LST1" DROP PORT INLINE,
         COMMAND """options results;
                    address DragnDrop;
                    line = '%s';
                    'list ID LST2 INSERT STRING' line;
                    'list ID LST1 REMOVE STRING' line;"""
     
     callhook ID HTML TRIG MUIA_HTMLtext_URL MUIV_EveryTime PORT INLINE,
         COMMAND """options results;
                    address DEMO;
                    object ID HTML ATTRS "MUIA_HTMLtext_URL";
                    url = import(d2c(result));
                    popasl ID SURL;
                    setvar url result;
                    popasl ID SURL CONTENT url;"""