

     ›1;33;42m Exploring ARexx - Utilities & Examples ›0;31;40m


[32m   <> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <>[0m


   These ARexx programs were written by M.Stapleton of Graphic Bits ©1992.
  Please feel free to modify them.  If you distribute them (or major portions
  thereof) please give me some credit, thanks!

   Most of these programs have stood the test of time - if any bugs surfaced
  I fixed them.  Many of the smaller programs were written to investigate a
  particular ARexx feature, so they should be robust as far as they go.  Just
  don't expect bullet-proof error checking here!  Macros especially should be
  written for speed and extensive error-checking during processing would
  really bog things down - one can always use TRACE if a program runs with
  puzzling behaviour.

   A brief description of each program follows below.  The programs are
  commented throughout, and the logic is generally straight-forward.  Except
  where necessary, I have not used ARP library functions for 3 reasons.  One,
  this PD library isn't included in the Release 2 distribution.  Two, some
  people are suspicious of arp.library, (although rexxarplib.library paves a
  more stable path).  Three, every external call from ARexx has enormous
  overhead because it Query()'s each library in its list until it finds the
  function, rather than just calling the function in the right library as is
  usual with Amiga library calls in a normal program.

   Some of the programs which require libraries explicitly ADDLIB() them, but
  most assume that all relevant libraries were added at startup.  Some of the
  programs will use the StartHost() program to start their command host, if
  not already running.  Also, in one or two cases there are builtin
  references to Art: and Art:Picture/ .  An AmigaDOS requester will rear its
  ugly head if AmigaDOS can't find these, as usual.  Just edit the script or
  make a directory!

   There are no major destructive activites going on here so don't be afraid
  to try the programs out, even if you're not exactly sure what they will do.
  Remember, the only way to learn a language is to use it, so experiment.For
  example, add appropriate error-checking, modify arguments & builtin
  parameters to customize for your uses.  If you have any questions write to
  MegaDisc.


                           ›1m C O N T E N T S ›0m


›1m A D P R O ›0m
    All these macros use the req.library file requester.

›4m3DCyanRed.adpro›0m       Merge a stereo pair of images for Cyan & Red 3D
                    glasses.

›4mConvert.adpro›0m         Convert arbitrary file to current image
                    settings.

›4mEmboss.adpro›0m          Creates a grey-scale image with an embossed
                    look. Taken from the manual.

›4mPicGrid.adpro›0m         Creates a HAM image consisting of a grid of
                    selected images. A handy pictorial index.


›1m C E D ›0m

›4mcommentq.ced›0m          Turn current line into a comment. Nests
                    comments properly.

›4mexpline.ced›0m           Capitalize & explode C U R R E N T   L I N E.

›4mpasteIFF.ced›0m          Bring up file requester to view an IFF file &
                    paste the full filename into text.

›4mpastename.ced›0m         Bring up file requester & paste the full filename
                    into text.

›4mquickrexx.ced›0m         Send this filename to 'REXX', i.e. execute the last
                    saved version of this script, which must be in Cygnus Ed's
                    Current Directory or the Rexx: assigned volume.

›4mrunrexx.ced›0m           Bring up file requester to launch an ARexx
                    script. The default directory is Rexx:.

›4mscroll.ced›0m            Turns CEDPro into a scrolling text viewer, with
                    nearly all builtin keys & all menues still available. The
                    numeric pad controls speed. Example of using ARexx's Clip
                    List, INTERPRET and CED's RAWKEY command.

›4msearchword.ced›0m        Search for next occurence of the current word.

›4mtextname.ced›0m          Globally search for '<nm>' & replace with the
                    file's basename, less extension. Great for creating
                    program documents!

›4muncomment.ced›0m         Restores a commented-out line. Handles nested
                    comments and comments which continue beyond one line
                    properly.


›1m R E X X ›0m

›4mcedline.rexx›0m          Call this program outside of CED to get current
                    cursor position & line contents. Can also view lines
                    above & below, & move cursor up & down.

›4mcoco.rexx›0m             A reworking of the classic problem involving
                    several shipwrecked sailors, a collection of gathered
                    coconuts & a monkey. An abominable ARexx treatment of
                    this can be found in Amazing Computing (Mar 92).
                    Warning - the autor of that article has a personal,
                    unique understanding of the concept of recursion! :^(

›4mfactorize.rexx›0m        Find the prime factoriztion of the argument.

›4mgrid.rexx›0m             Opens the printer PAR: file and prints a square
                    grid using ANSI graphic characters. Make sure printer
                    is ready. This program doesn't use the preferences
                    printer driver, the printer must be EpsonQ compatible.

›4mhelp.rexx›0m             Simple example of using ARexx to display a text
                    file, without using ARP.

›4mipc.rexx›0m              A multi-process extension of John Collett's
                    message-sending example.

›4mipcWait.rexx›0m          Companion function to ipc.rexx. By sending this
                    to 'AREXX' we have multitasking.

›4mJarA.rexx›0m             Create an 'ASCII archive'. Mainly for
                    concatenating source files (C or Rexx). Separates each
                    file with a comment containing file name & size. Syntax
                    like usual archivers.

›4mLEDMouse.rexx›0m         Detect if Left Mouse Button is depressed & dim
                    the power LED if it is.

›4mnumraw.rexx›0m           Convert a decimal digit to its Numeric pad
                    rawkey value.

›4mprimes.rexx›0m           Eratothenes meets ARexx.

›4mQSAY.rexx›0m             A simple 'ARexx Shell'. Execute commands or
                    evaluate expressions.

›4mslide3d3.rexx›0m         A three-dimensional sliding-block puzzle with
                    randomizer based on time.

›4mSortLines.rexx›0m        Uses the QuickSort FUNCTION Host, supplied with
                    the commercial ARexx, but I think it is PD.

›4mStartHost.rexx›0m        Check if named port exists, if not attempt
                    execution of given command line.

›4mtree5.rexx›0m            Using compound variables to create a simple (!)
                    binary tree. The tree is used to sort the lines of a file.


›1m P O W E R   P A C K E R ›0m

›4mautocrunch.pprx›0m       Bring up file requester for name of file to
                    crunch. Crunches, saves & reprompts.


[1;32m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0;31m

    If you have any comments or questions, send them to MegaDisc or

    To:
        Graphic Bits
        P.O. Box 674
        Bankstown 2200
        NSW, Australia.

Have Fun!


[1;32m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0;31m


[32m   <> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <>[0m


