home *** CD-ROM | disk | FTP | other *** search
- This archive contains a few example ARexx programs. A few of them might
- even be useful to you.
- ----------------------------------------------------------------------------
- Notes: These programs assume that the ARexx support library has been
- opened. I open it in my startup-sequence because I use ARexx a lot.
-
- On my system, 'delete' is called 'del'. If it isn't called that on
- your system, just change any occurences of 'del' to whatever you
- call it on your system.
-
- Many of these programs are tools I use often. Since I don't like
- typing 'rx' before them, I use WShell. I highly recommend it.
- ----------------------------------------------------------------------------
- The programs:
-
- join.rexx
- ----------
- The standard Amigados JOIN command has a small problem. If the output
- file is the same name as one of the input files, JOIN will complain, and
- will even wipe out that file, leaving it empty. join.rexx fixes this by
- detecting whether the above condition is met, and if it is, changes the
- command line to make the output a file called 'arexxtempfile', calling the
- Amigados JOIN with it, then copying the temp file to the real output file
- name, and deleting the temp file.
-
- append.rexx
- -----------
- Syntax: append a b c
-
- A special case of JOIN. In the above example, will JOIN files named a, b,
- and c. The resulting joined file will be named 'a'. It does its work by
- adding 'AS' and the first filename in the command line to the end of the
- command line and calling join.rexx
-
- copy.rexx
- ---------
- This was written to do a job for me. It also serves as an example of how
- to modify a command by placing an appropriately named file in the REXX:
- directory. If you are using WShell, the REXX: directory is searched before
- the C: directory when you type a command. If the file is found, it will be
- executed as an ARexx script, allowing you to do anything you want with the
- command line before calling the actual program. In this case, copy.rexx
- lets me use the '*' wildcard. it performs its function by replacing all
- instances of '*' with '#?'.
-
- man.rexx
- --------
- Similar to the Unix 'man', this allows you to have online documentation
- files. In my case, I have an assigned directory called 'DOCS:', and within
- that directory, a number of text files that end with '.doc'. This program
- finds the appropriate one and uses 'more' to display it. You could have it
- call your favourite editor, or just type the file out to the console.
-
- plot.rexx
- ---------
- This one is by Rick Morris of Vancouver BC. It is rather specialized, but
- fascinating because it shows the power of ARexx in non-trivial programs.
- It will accept a PCLO 'BLOCK' file, and plot it double sized on a Toshiba
- P351 printer (24 pin, impact, dot matrix). You can probably modify it for
- any other printer, though best results will be obtained with 24 pins or
- on a laser printer. PCLO is a printed circuit board CAD program from
- SoftCircuits.
-
- touch.rexx
- ----------
- Sets the date on a file to the current date and time. Setdate is normally
- used for this, and in fact is called by touch.rexx to do its thing. The
- difference here is that if the file does not exist, it will be created as
- an empty file. Handy for those programs that require a file of a certain
- name, but aren't smart enough to create one.
-
- arcall.rexx
- -----------
- A program that will ARC all files within a directory, including
- subdirectories. It will rename all files to the form 'File1', 'File2',
- etc. and will generate a standard Amigados script file that will be
- included in the .ARC file. This script file, when executed, recreates the
- original file structure, creating any necessary subdirectories and renaming
- all files back to their original names. Written at the request of the sysop
- of the Panorama BBS in Vancouver BC.
-
- ports.rexx
- ports2.rexx
- -----------
- Two examples (not at all useful) of interprocess communication. To use,
- open a second CLI, and run 'ports' in one of them. It will print a message
- and wait. When you run 'ports2' in the other CLI, it will send a message to
- 'ports'. When 'ports' receives the message, it will print it and exit.
- ---------------------------------------------------------------------------
-
- Use the code in these programs in any way you see fit. If you have examples
- of your own ARexx programs, I and many others would like to see them.
-
- Larry Phillips.
- Compuserve: 76703,4322
-
-