/**************************************************************************/ /* MakeColors.urbx */ /* */ /* Copyright ©1998 by Dick Whiting */ /* */ /*------------------------------------------------------------------------*/ /* Example script for creating an URB configuration */ /* This one was the one used to create the UCWCOLOR configuration for */ /* UrbCedWWW. */ /**************************************************************************/ /* $VER: 1.0 Copyright ©1998 by Dick Whiting $AUTHOR: Dick Whiting $DESCRIPTION: Example script for creating an URB configuration */ ljust='^l' /* force labels left justified*/ options results address URBCONFIG parse arg filename 'GET MAX' entries=result say "Max entries: "entries /**************************************************************************/ /* Clear the existing list */ /**************************************************************************/ say "Clearing list..." do i=0 to entries-1 'SET POS' i 'CLEAR' end /**************************************************************************/ /* Now insert new values starting at top */ /**************************************************************************/ current=0 'SET POS' current goodopen=open('IN',filename,'R') if goodopen then do do until eof('IN') if current>=entries then do say "Configuration list is full" say "Last inserted: "current exit end linein=readln('IN') if left(linein,1)=';' then iterate /* a comment line */ if linein='' then do /* leave one blank button */ current=current+1 iterate end parse var linein red green blue name red=d2x(red) red=right(red,2,'0') green=d2x(green) green=right(green,2,'0') blue=d2x(blue) blue=right(blue,2,'0') say "Inserting entry" current 'SET POS' current 'SET LABEL' ljust||name 'SET RUNTYPE 1' 'SET COMMAND Rexx/Insert.ucwx #'red||green||blue current=current+1 end result=close('IN') end else do say "Unable to open "filename end exit