WordPerfect 2000 (9) Macros
For Inserting Browse Link
(in case you're interested: these are old and have been replaced)
Application (WordPerfect; "WordPerfect"; Default!; "EN")
// BrowseTool Marks All But End File After Removing Any Existing Browse Links
Display (On!) SelectMode (State: Off!) NotFound (Off!) // keep from croaking if not found PosDocTop ()
ASSIGN (vFileName; ?Name) // Grab FileName (e.g., "eml9666.htm") ASSIGN (vFileNumber; SUBSTR (vFileName; 4; 4)) // Extract FileNumber (e.g., 9666) IF ((vFileNumber + 1) = (1 + vFileNumber)) // "addition is commutative" -- Tom Lehrer ELSE // numeric or character string? QUIT // croaks unless characters 4 through 7 are all numerals ENDIF
SearchString ("BrowseToolMark") // Delete Existing Browse Link (IF)
SearchNext (SearchMode: Regular!)
SelectOff ()
SearchString ("<LI>") // Delete Existing Browse Link (IF)
SearchPrevious (SearchMode: Regular!)
SearchString ("</LI>") // Delete Existing Browse Link (IF)
MatchExtendSelection ()
SearchNext (SearchMode: Regular!)
DeleteCharNext ()
PosDocTop () // Find Link Section (Always After First <UL> Code)
SearchString (StrgToLookFor: "<UL>")
MatchPositionAfter ()
SearchNext (SearchMode: Regular!)
MatchSelection () // reset Match
HardReturn () // Type Link
HardReturn ()
Type ("<LI>Browse: ")
Type ("<B><A HREF=""emlabout.htm"">About</A></B>")
Type ("<A NAME=""BrowseToolMark""></A>") // Type Marker Comment For Delete Routine (Above)
Type ("; ") // Type "Previous" Link One FileNumber Higher (e.g., "eml9667.htm")
Type ("<B><A HREF=""eml" + (vFileNumber + 1) + ".htm"">Previous</A></B>")
Type ("; ") // Type "Next" Link One FileNumber Lower (e.g., "eml9665.htm")
Type ("<B><A HREF=""eml" + (vFileNumber - 1) + ".htm"">Next</A></B>")
Type ("</LI>")
HardReturn ()
![]()
Application (WordPerfect; "WordPerfect"; Default!; "EN")
// BrowseTool Marks End File Only After Removing Any Existing Browse Links
Display (On!) SelectMode (State: Off!) NotFound (Off!) // keep from croaking if not found PosDocTop () ASSIGN (vFileName; ?Name) // Grab FileName (e.g., "eml9666.htm") ASSIGN (vFileNumber; SUBSTR (vFileName; 4; 4)) // Extract FileNumber (e.g., 9666) IF ((vFileNumber + 1) = (1 + vFileNumber)) // "addition is commutative" -- Tom Lehrer ELSE // numeric or character string? QUIT // croaks unless characters 4 through 7 are all numerals ENDIF
SearchString ("BrowseToolMark") // Delete Existing Browse Link (IF)
SearchNext (SearchMode: Regular!)
SelectOff ()
SearchString ("<LI>") // Delete Existing Browse Link (IF)
SearchPrevious (SearchMode: Regular!)
SearchString ("</LI>") // Delete Existing Browse Link (IF)
MatchExtendSelection ()
SearchNext (SearchMode: Regular!)
DeleteCharNext ()
PosDocTop () // Find Link Section (Always After First <UL> Code)
SearchString (StrgToLookFor: "<UL>")
MatchPositionAfter ()
SearchNext (SearchMode: Regular!)
MatchSelection () // reset Match
HardReturn () // Type Link
HardReturn ()
Type ("<LI>Browse: ")
Type ("<B><A HREF=""emlabout.htm"">About</A></B>")
Type ("<A NAME=""BrowseToolMark""></A>") // Type Marker Comment For Delete Routine (Above)
Type ("; ") // Type "Previous" Link One FileNumber Higher (e.g., "eml9667.htm")
Type ("<B><A HREF=""eml" + (vFileNumber + 1) + ".htm"">Previous</A></B>")
Type ("; ") // Type "End" -- Not Linked
Type ("<B>End</B>")
Type ("</LI>")
HardReturn ()
![]()
WordPerfect 2000 (9) Macros
For Creating Tile Viewer
(in case you're interested: this was finished in February, 2004)
Application (WordPerfect; "WordPerfect"; Default!; "EN")// ASSIGN!
// Converted from utility below
Declare (aGraphicName[292])
Assign (aGraphicName[1]; "tile_300600.gif")
Assign (aGraphicName[2]; "tile223g216.gif")
Assign (aGraphicName[3]; "tile25mask96f.gif")
Assign (aGraphicName[4]; "tile25maskc3c.gif")
Assign (aGraphicName[5]; "tile25maskf0f.gif")
Assign (aGraphicName[6]; "tile8brick.gif")
Assign (aGraphicName[7]; "tileawsmrblz.gif")
// [...] Skip 280 lines, okay?
Assign (aGraphicName[288]; "tileyellospex.gif")
Assign (aGraphicName[289]; "tileyelparch.gif")
Assign (aGraphicName[290]; "tileyelprchdth.gif")
Assign (aGraphicName[291]; "tilezampdark.htm")
Assign (aGraphicName[292]; "tilezamplight.htm")
ForNext (cLoop; 1; 292; 1)
// END ASSIGN!
// ENGINE!
Type ("<TR>")
HardReturn ()
Type ("<TD width=15% height=120 align=center valign=middle bgcolor=#010101>")
HardReturn ()
Type ("<P><FONT face=""Arial, Helvetica, sans-serif""> </FONT></P>")
HardReturn ()
Type ("</TD>")
HardReturn ()
Type ("<TD height=120 valign=middle width=80% bgcolor=#020202 background=")
Type (aGraphicName[cLoop])
Type (">")
HardReturn ()
Type ("<P class=span><B><FONT face=""Arial, Helvetica, sans-serif"" size=+1>• ")
Type (aGraphicName[cLoop])
Type (" •</FONT></B></P>")
HardReturn ()
Type ("<P><B><FONT face=""Arial, Helvetica, sans-serif"" size=-1>• •</FONT></B></P>")
HardReturn ()
Type ("</TD>")
HardReturn ()
Type ("<TD width=5% height=120 bgcolor=#030303> </TD>")
HardReturn ()
Type ("</TR>")
HardReturn ()
HardReturn ()
EndFor
// END ENGINE!
QUIT
// // CONVERT!
// // Converts DIR List of Tile Names to Macro Command Coding
// ForNext (cLoopy; 1; 292; 1)
// Type ("Assign (aGraphicName[" + cLoopy + "]; """)
// PosLineEnd ()
// Type (""")")
// PosParagraphNext ()
// EndFor
// // END CONVERT!
// // REMOVE!
// // Removes Table Rows Marked (By Hand) with At Symbol ("@")
// SearchString (StrgToLookFor: "@")
// MatchPositionBefore ()
// SearchNext (SearchMode: Regular!)
// SearchString (StrgToLookFor: "<TR")
// MatchPositionBefore ()
// SearchPrevious (SearchMode: Regular!)
// SearchString (StrgToLookFor: "</TR>")
// MatchExtendSelection ()
// SearchNext (SearchMode: Regular!)
// DeleteCharPrevious ()
// DeleteCharNext ()
// DeleteCharNext ()
// // END REMOVE!
Material by Cliff Walker (including unsigned editorial commentary) is copyright ©1995-2008 by Cliff
Walker. Each submission is copyrighted by its writer, who retains control of the work except that by submitting it to Positive Atheism, permission has been granted to use the material or an edited version: (1) on the Positive Atheism web site; (2) in Positive Atheism Magazine; (3) in subsequent works controlled by
Cliff Walker or Positive Atheism Magazine (including published or posted compilations). Excerpts not exceeding 500 words are allowed provided the proper copyright notice is affixed. Other use requires permission; Positive Atheism will work
to protect the rights of all who submit their writings to us.