This utility copies the window and color settings of one operator code to the other operators. It reads the operator you choose, then updates every operator record in IDDBD with the same settings.
00010 REM &REM&00020 BEGIN00030 FORMAT INCLUDE #IDOPER, OPT="NONE"; ! Operator format FORMAT INCLUDE #IDOPER1 ! Duplicate of operator format00040 OPEN(1)"IDDBD" ! Open dictionary00050 QP$="Operator to copy from (F4 to quit)- "; ! Get oper to copy C=0; R=5; PRINT @(C,R),QP$; FINPUT (0,ATR=$05$+CHR(C+1+LEN(QP$))+CHR(R)+CHR(3)+CHR(3))OP$00060 IF CTL=4 ! If press F4, quit GOTO 9999 FI; READ(1,KEY=$0001$+OP$,DOM=50,ERR=9999)#IDOPER ! Read oper. rec.00070 K$=$0001$+DIM(4,$20$); ! Set key pointer to top of opers GOTO 9000080 K$=KEY(1) ! Get next oper00090 READ(1,KEY=K$,DOM=70)#IDOPER1 ! Read oper.00100 IF K$(1,2)<$0002$ ! If not at end of operators #IDOPER1.WINDOW-PAINT-MODE=#IDOPER.WINDOW-PAINT-MODE, ! Copy all #IDOPER1.MENU-WINDOW-COLOR=#IDOPER.MENU-WINDOW-COLOR, ! windows & #IDOPER1.MENU-BORDER-COLOR=#IDOPER.MENU-BORDER-COLOR, ! color #IDOPER1.VIEW-WINDOW-COLOR=#IDOPER.VIEW-WINDOW-COLOR, ! settings #IDOPER1.VIEW-BORDER-COLOR=#IDOPER.VIEW-BORDER-COLOR, #IDOPER1.DE-WINDOW-COLOR=#IDOPER.DE-WINDOW-COLOR, #IDOPER1.DE-BORDER-COLOR=#IDOPER.DE-BORDER-COLOR, #IDOPER1.HELP-WINDOW-COLOR=#IDOPER.HELP-WINDOW-COLOR, #IDOPER1.HELP-BORDER-COLOR=#IDOPER.HELP-BORDER-COLOR, #IDOPER1.EDITOR-WINDOW-COLOR=#IDOPER.EDITOR-WINDOW-COLOR, #IDOPER1.EDITOR-BORDER-COLOR=#IDOPER.EDITOR-BORDER-COLOR, #IDOPER1.MENU-LIGHTBAR-COLOR=#IDOPER.MENU-LIGHTBAR-COLOR, #IDOPER1.VIEW-LIGHTBAR-COLOR=#IDOPER.VIEW-LIGHTBAR-COLOR, #IDOPER1.DEFAULT-COLORS= #IDOPER.DEFAULT-COLORS, #IDOPER1.MENU-LBAR-BGRD-COLOR=#IDOPER.MENU-LBAR-BGRD-COLOR, #IDOPER1.VIEW-LBAR-BGRD-COLOR=#IDOPER.VIEW-LBAR-BGRD-COLOR, #IDOPER1.VIEW-HDG-COLOR=#IDOPER.VIEW-HDG-COLOR, #IDOPER1.FIELD-ENTRY-COLOR =#IDOPER.FIELD-ENTRY-COLOR; FOR A=1 TO 13; #IDOPER1.WIND-ATTR(A)=#IDOPER.WIND-ATTR(A); NEXT A; FOR A=1 TO 7; #IDOPER1.WIND-BORDER-TYPE(A)=#IDOPER.WIND-BORDER-TYPE(A), #IDOPER1.WIND-BORDER-ATTR(A)=#IDOPER.WIND-BORDER-ATTR(A), #IDOPER1.WIND-SEL-ATTR(A)=#IDOPER.WIND-SEL-ATTR(A), #IDOPER1.WIND-PAINTMODE(A)=#IDOPER.WIND-PAINTMODE(A); NEXT A ELSE GOTO 9999 ! Quit FI00110 WRITE(1,KEY=K$)#IDOPER1 ! Write changes00120 GOTO 80 ! Get next oper09999 END ! EndNotes
- Enter the operator code to copy from, or press F4 to quit.
- The program updates every operator record, not just one, so review the operator list before you run it.
- It uses two copies of the operator format, #IDOPER and #IDOPER1, to hold the source and target records.