/* ** html_formular_list.ced ** ** $VER: html_formular_list.ced 2.2 (02.17.1999) ** ** Arexx script for HTML v3.2 formular list input ** ** 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. */ /* **------------------------------------------------------------------------------ ** Input identification name **------------------------------------------------------------------------------ */ GETSTRING '"Name"' '"Indentification name for the list?"' ListName = RESULT IF (ListName=" " | ListName="RESULT") THEN EXIT 0 ELSE NOP /* **------------------------------------------------------------------------------ ** Input number **------------------------------------------------------------------------------ */ GETNUMBER 5 '"Input Number?"' 0 32768 InputNumber = RESULT IF (InputNumber=" ") THEN EXIT 0 ELSE NOP /* **------------------------------------------------------------------------------ ** Several selected inputs **------------------------------------------------------------------------------ */ GETSTRING "n" '"Several selected inputs: (y)es, (n)o?"' SelectedInputMode = RESULT IF (SelectedInputMode=" " | SelectedInputMode="RESULT") THEN EXIT 0 ELSE NOP /* **------------------------------------------------------------------------------ ** Pre-selected inputs **------------------------------------------------------------------------------ */ SingleSelection = "no" I = 1 DO WHILE (SingleSelection="no") String = '"Pre-select input n°' || I || ': (y)es, (n)o?"' GETSTRING "n" String PreSelect.I = RESULT IF (PreSelect.I=" " | PreSelect.I="RESULT") THEN EXIT 0 ELSE NOP IF (SelectedInputMode="n" & PreSelect.I="y") THEN SingleSelection = "ok" ELSE NOP IF (I=InputNumber) THEN SingleSelection = "ok" ELSE NOP I = I + 1 END DO J=I TO InputNumber PreSelect.J = "n" END /* **------------------------------------------------------------------------------ ** Html Input marks **------------------------------------------------------------------------------ */ OpenList = '" DO I=1 TO InputNumber IF (PreSelect.I="n") THEN OpenOption.I = "" /* **------------------------------------------------------------------------------ ** Html Input structure **------------------------------------------------------------------------------ */ TEXT OpenList ; "AUTO-INDENT" ; KTAB DO I=1 TO InputNumber TEXT OpenOption.I "AUTO-INDENT" ; KTAB TEXT "" "AUTO-INDENT" TEXT "Should be modified" "AUTO-INDENT" ; BACKTAB ; "DELETE TO EOL" TEXT CloseOption ; "Auto-INDENT" END BACKTAB ; TEXT CloseList "DELETE TO EOL" /* **------------------------------------------------------------------------------ ** End of html_formular_list.ced Arexx script **------------------------------------------------------------------------------ */ EXIT 0