home *** CD-ROM | disk | FTP | other *** search
- /* Load_Address */
- /* A SuperMacro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO
- 80918. © Copyright 1994 Steven. R. Giovenella, All rights reserved.
- This macro is my gift to the Amiga community. It may be given away freely to
- anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of
- reproduction, shipping, or handling, without express written permission from the
- author. This macro may NOT be added to any disk which is to be sold for any price
- or fee, to include shipping and handling. The ONLY way this macro may be
- distributed is on a disk which is given away 100% free of all charges, or via
- telecommunications networks which do not charge any additional fee as a result of a
- user downloading this particular macro, although general fees for access to the
- telecommunications system as a whole are acceptable. This macro may only
- bereproduced in its entirety, including all comment lines and code. The individual
- user may alter this macro for personal use, but may not then distribute the macro
- in any modified form. If you wish, feel free to send me some money, a Christmas
- card, some other piece of software, or absolutely nothing as a gift for creating this
- macro. The author of this software is not responsible for any data loss or damage to
- computer equipment as a result, direct or indirect, of the use of this macro. */
-
- Options Results
-
- /* Determine insertion point */
- ShowMessage 1 0 '"Place cursor where you want " "the new address(es) in
- serted." "BEFORE BEGINNING THIS MACRO." " OK, Go on! " " Stop! "
- ""'
- IF Result = 2 THEN Exit
- type " "
- backspace
-
- /* Open the data file */
- RequestText '"Load Address" "Enter source Data File..."
- "Address_DataFile"'
- datafile = Result
- file = "FWDocs/"||datafile
- Open file
- type " "
- backspace
-
- /* Address the data file */
- Status PortName
- port = Result
- portnumber = RIGHT(port,1) + 1
- newport = LEFT(port,7)||portnumber
- ADDRESS VALUE newport
- Cursor UP
-
-
- BeginSearch:
-
- /* Get a string to search for */
- RequestText '"Load Address" "Enter search text" ""'
- Searchtext = Result
-
-
- /* Search for it */
- m=0
- MoveToPara 2 0
- Status LinePos
- oldcoords = Result
- Find
- DO Forever
- Find searchtext
- Status LinePos
- coords = Result
- IF coords=oldcoords THEN DO
- Leave
- END
- PARSE VAR coords BegLine BegPos EndLine EndPos
- IF EndPos~=0 THEN DO
- m = m+1
- Cursor RIGHT
- AltDOWN
- Cursor UP
- ShiftDOWN
- AltDOWN
- Cursor DOWN
- extract
- match.m = Result
- AltUp
- CtrlUp
- ShiftUP
- END
- oldcoords=coords
- END
-
- /* Reveal Matches */
- ShowMessage 1 0 '" 'm' match(es) found! " " " "" " Continue " " Start New
- Search " " Cancel "'
- IF Result = 2 THEN Call BeginSearch
- IF Result = 3 THEN DO
- Close FORCE
- Exit
- END
-
- /* Switch Arexx ports */
- ADDRESS VALUE port
- Cursor LEFT
- Cursor RIGHT
- WinToFront
-
- /* Load all addresses */
- DO i = 1 to m
- lastchar = ""
- comma = 0
- DO char = 1 to LENGTH(match.i)
- thischar = RIGHT(LEFT(match.i, char),1)
- IF thischar = "," THEN DO
- comma = comma + 1
- IF comma~=2 THEN DO
- IF lastchar ~= "," THEN newparagraph
- END
- IF comma=1 then DO
- AltUP
- CtrlDOWN
- Cursor UP
- CtrlUP
- END
- IF comma=2 then DO
- type " "
- CtrlDOWN
- Cursor DOWN
- CtrlUP
- END
- IF comma=6 then DO
- backspace
- type ", "
- END
- IF comma=7 then DO
- backspace
- type " "
- END
- END
- IF thischar ~= "," THEN DO
- type thischar
- END
- lastchar = thischar
- END
- newparagraph
- newparagraph
- END
- /* Close Data File */
- ADDRESS VALUE newport
- Cursor LEFT
- Cursor RIGHT
- Close FORCE
-
-