home *** CD-ROM | disk | FTP | other *** search
- /*
- ** html_table_default.ced
- **
- ** $VER: html_table_default.ced 1.1 (12.07.1998)
- **
- ** Arexx script for HTML v3.2 table default cell options
- **
- ** 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. */
-
- /*
- **------------------------------------------------------------------------------
- ** Horizontal position
- **------------------------------------------------------------------------------
- */
-
- HorizontalPosition = "q"
- DO WHILE ~(HorizontalPosition="l" | HorizontalPosition="c" | HorizontalPosition="r",
- | HorizontalPosition=" " | HorizontalPosition="RESULT")
- GETSTRING "c" '"Horizontal position: (l)eft, (c)enter, (r)ight?"'
- HorizontalPosition = RESULT
- END
-
- IF (HorizontalPosition="RESULT" | HorizontalPosition=" ")
- THEN EXIT 0
- ELSE NOP
-
- /*
- **------------------------------------------------------------------------------
- ** Vertical position
- **------------------------------------------------------------------------------
- */
-
- VerticalPosition = "q"
- DO WHILE ~(VerticalPosition="t" | VerticalPosition="b" | VerticalPosition="m",
- | VerticalPosition=" " | VerticalPosition="RESULT")
- GETSTRING "m" '"Vertical position: (t)op, (m)iddle, (b)ottom?"'
- VerticalPosition = RESULT
- END
-
- IF (VerticalPosition="RESULT" | VerticalPosition=" ")
- THEN EXIT 0
- ELSE NOP
-
- /*
- **------------------------------------------------------------------------------
- ** Cell color
- **------------------------------------------------------------------------------
- */
-
- GETSTRING "#60FF60" '"Cell color (#RGB)?"'
- CellColor = RESULT
-
- IF (CellColor="RESULT" | CellColor=" ")
- THEN EXIT 0
- ELSE NOP
-
- /*
- **------------------------------------------------------------------------------
- ** Cell width
- **------------------------------------------------------------------------------
- */
-
- GETSTRING "100%" '"Cell width (pixels or browser window %)?"'
- CellWidth = RESULT
-
- IF (CellWidth="RESULT" | CellWidth=" ")
- THEN EXIT 0
- ELSE NOP
-
- /*
- **------------------------------------------------------------------------------
- ** Cell height
- **------------------------------------------------------------------------------
- */
-
- GETSTRING "100%" '"Cell height (pixels or browser window %)?"'
- CellHeight = RESULT
-
- IF (CellHeight="RESULT" | CellHeight=" ")
- THEN EXIT 0
- ELSE NOP
-
- /*
- **------------------------------------------------------------------------------
- ** Html table default cell marks
- **------------------------------------------------------------------------------
- */
-
- SELECT
- WHEN (HorizontalPosition="c") THEN HorizontalPositionString = " ALIGN=CENTER"
- WHEN (HorizontalPosition="l") THEN HorizontalPositionString = " ALIGN=LEFT"
- WHEN (HorizontalPosition="r") THEN HorizontalPositionString = " ALIGN=RIGHT"
- OTHERWISE NOP
- END
-
- SELECT
- WHEN (VerticalPosition="t") THEN VerticalPositionString = " VALIGN=TOP"
- WHEN (VerticalPosition="m") THEN VerticalPositionString = " VALIGN=MIDDLE"
- WHEN (VerticalPosition="b") THEN VerticalPositionString = " VALIGN=BOTTOM"
- OTHERWISE NOP
- END
-
- OpenCell = "<TD"
- OpenCell = OpenCell || HorizontalPositionString
- OpenCell = OpenCell || VerticalPositionString
- OpenCell = OpenCell || " WIDTH=" || CellWidth
- OpenCell = OpenCell || " HEIGHT=" || CellHeight
- OpenCell = OpenCell || " BGCOLOR=" || CellColor || ">"
- CloseCell = "</TD>"
-
- /*
- **------------------------------------------------------------------------------
- ** Html table default cell structure
- **------------------------------------------------------------------------------
- */
-
- TEXT OpenCell
- "AUTO-INDENT" ; KTAB
- TEXT "Should be modified - Default cell"
- "AUTO-INDENT" ; BACKTAB
- TEXT CloseCell
-
- /*
- **------------------------------------------------------------------------------
- ** End of html_table_default.ced Arexx script
- **------------------------------------------------------------------------------
- */
-
- EXIT 0
-