home *** CD-ROM | disk | FTP | other *** search
- /*
- ** html_paragraph.ced
- **
- ** $VER: html_paragraph.ced 1.0 (12.02.1998)
- **
- ** Arexx script for HTML v3.2 paragraph stucture
- **
- ** This script works with CygnusEd Professional v4.2
- **
- ** Copyright ⌐ Eric BELLE
- */
-
- /*
- **------------------------------------------------------------------------------
- ** Initialisation
- **------------------------------------------------------------------------------
- */
-
- OPTIONS RESULTS /* Tell CygnusEd to return results. */
- NL = '0A'X /* Alias for new line. */
- KRETURN = RAWKEY 68 /* Shortcut to the return key. */
- KTAB = RAWKEY 66 /* Shortcut to the tab key. */
- STATUS TABSARESPACES /* Return TAB mode ("tab" or "space"). */
- IF RESULT = 1 /* Test the TAB mode. */
- THEN "TABS = SPACES" /* Switch TAB mode from "space" to "tab". */
- ELSE NOP /* No operation. */
- TAB SIZE 1 /* Set TAB size proportional to 2 spaces. */
-
- /*
- **------------------------------------------------------------------------------
- ** Paragraph position
- **------------------------------------------------------------------------------
- */
-
- ParagraphPositionMode = "q"
- DO WHILE ~(ParagraphPositionMode="l" | ParagraphPositionMode="c",
- | ParagraphPositionMode="r",
- | ParagraphPositionMode=" " | ParagraphPositionMode="RESULT")
- GETSTRING "c" '"Paragraph position: (l)eft, (c)enter, (r)ight ?"'
- ParagraphPositionMode = RESULT
- END
-
- IF (ParagraphPositionMode="RESULT" | ParagraphPositionMode=" ")
- THEN EXIT 0
- ELSE NOP
-
- /*
- **------------------------------------------------------------------------------
- ** Html paragraph marks
- **------------------------------------------------------------------------------
- */
-
- OpenParagraph = "<P"
- CloseParagraph = "</P>"
-
- SELECT
- WHEN (ParagraphPositionMode="c") THEN ParagraphPosition = " ALIGN=CENTER>"
- WHEN (ParagraphPositionMode="r") THEN ParagraphPosition = " ALIGN=RIGHT>"
- WHEN (ParagraphPositionMode="l") THEN ParagraphPosition = " ALIGN=LEFT>"
- OTHERWISE NOP
- END
-
- /*
- **------------------------------------------------------------------------------
- ** Html paragraph structure
- **------------------------------------------------------------------------------
- */
-
- TEXT OpenParagraph || ParagraphPosition ; "AUTO-INDENT" ; KTAB
- TEXT "Should be modified - Paragraph" ; "AUTO-INDENT" ; BACKTAB
- TEXT CloseParagraph
-
- /*
- **------------------------------------------------------------------------------
- ** End of html_paragraph.ced Arexx script
- **------------------------------------------------------------------------------
- */
-
- EXIT 0
-