10 REM > BLib\Win\Choices 1.00 14-Mar-2005
   20 REM Find user's choices
   30 REM (C)J.G.Harston, may be freely used and redistributed
   40 REM v1.00 14-Mar-2005 JGH: Rd(), Find(), Init() functions
   50 :
   60 REM REQUIRE PROCChoices_Rd()   needs PROCVar_Assign() from Variable
   70 REM REQUIRE   FNChoices_Find() needs PROCReg_Rd()     from Win\Reg
   80 REM REQUIRE PROCChoices_Set()  needs PROCReg_Rd()     from Win\Reg
   90 :
  100 :
  110 REM PROCChoices_Rd() - read choices from specified file
  120 REM Sets string variables 'm<name>' to contents of choices file
  130 REM -----------------------------------------------------------
  140 :
  150 DEFPROCChoices_Rd(file$):LOCAL A$,A%
  160 in%=OPENIN(file$)
  170 IFin% THEN
  180   REPEAT
  190     A$=GET$#in%:IF LEFT$(A$,1)="#":A$=""
  200     A%=INSTR(A$,":"):IF A% THEN
  210       A%=A%-1:REPEAT:A%=A%+1:UNTIL MID$(A$,A%,1)<>" "
  220       PROCVar_Assign("m"+LEFT$(A$,A%-1)+"$",""""+MID$(A$,A%+1)+"""")
  230     ENDIF
  240   UNTIL EOF#in%:CLOSE#in%:in%=0
  250 ENDIF
  260 ENDPROC
  270 :
  280 :
  290 REM PROCChoices_Find() - Find a choices filename from registery
  300 REM -----------------------------------------------------------
  310 :
  320 DEFFNChoices_Find(Publisher$,Application$)
  330 =FNReg_Rd("Software\"+Publisher+"\"+Application$+"\Settings")
  340 :
  350 :
  360 REM PROCChoices_Set() - Set a choices filename in registery
  370 REM -------------------------------------------------------
  380 :
  390 DEFFNChoices_Set(Publisher$,Application$,Path$)
  400 PROCReg_Wr("Software\"+Publisher+"\"+Application$+"\Settings",Path$)
  410 :