Loading ...
Sorry, an error occurred while loading the content.

Flash Card Quiz (fcq46.bas)

Expand Messages
  • green8819
    Now I know how to hide a file from the user, thanks to Internet. Those who are following this series, here is the final uodate, fcq46.bas As you will know from
    Message 1 of 6 , Feb 11, 2013
    • 0 Attachment
      Now I know how to hide a file from the user, thanks to Internet.

      Those who are following this series, here is the final uodate, fcq46.bas As you will know from the code below, the scoreFile is hidden in the program folder itself. This ensures that no related file will be left behind once the the program folder is deleted.

      A sample Quiz file is annexed below the code. Create a new folder, add the bas file and a Quiz file into it. This becomes the program folder.

      '----start code
      [startQuiz]
      nomainwin

      dim info$(10, 10)
      CrLf$=chr$(13)+chr$(10) :sp$=chr$(131) 'filler character

      filedialog "Open quiz file", DefaultDir$+"\*.txt", qzFile$
      if qzFile$="" then END
      tx=0 :tt=0 :qx=0 :qt=0 :ax=0 :at=0 :er$=""
      open qzFile$ for input as #w
      if LOF(#w)=0 then notice ""+chr$(13)+"File is blank" :close #w :END
      ' to detect possible errors in quiz file format
      while eof(#w)=0
      line input #w, line$
      if line$="t----------" then tx=tx+1 :line input #w, x$ :tt=tt+1
      if x$="q=" or x$="a=" or x$="t----------" then tt=tt-1
      if line$="q--" then qx=qx+1 :line input #w, x$ :qt=qt+1
      if x$="q=" or x$="a=" or x$="t----------" then tt=tt-1
      if line$="a--" then ax=ax+1 :line input #w, x$ :at=at+1
      if x$="q=" or x$="a=" or x$="t----------" then tt=tt-1
      wend
      close #w
      if (tx<>tt) or (qx<>qt) or (ax<>at) or (qx<>ax) then
      notice "Quiz Data Error"+chr$(13)+"Check the QUIZ file for errors" :END
      end if
      'if file exists, then name of file=qz$
      if fileExists(DefaultDir$,qzFile$) then qz$=info$(1,0)
      qz$=info$(1,0) :qzlen=len(qz$) :qz$=mid$(qz$,4,qzlen-7)+ " Quiz"
      '------------------------------------------------------------------
      'Records file, create if not existing
      open DefaultDir$+"\pmwd.txt" for append as #rec
      close #rec

      [startTopic]
      totrec=0
      open "pmwd.txt" for input as #rec
      while eof(#rec) = 0
      line input #rec, line$
      totrec=totrec+1
      wend
      close #rec
      'this is the first hide, second is after score update
      'this ensures file remains hidden even between breaks
      'only way to unhide for user is Folder Options
      run "attrib +s +h "+"pmwd.txt", hide
      calldll #kernel32,"Sleep",50 as ulong,r as void

      'check to ensure each record consists of 4 fields
      if totrec<>int(totrec) then notice "ScoreFile is corrupt":end
      dim rec$(totrec+1,4),past$(totrec+1),name$(totrec+1),name$(totrec+1)

      open "pmwd.txt" for input as #a
      for x=1 to totrec
      line input #a, line$
      rec$(x,1)=word$(line$,1,sp$) :rec$(x,2)=word$(line$,2,sp$)
      rec$(x,3)=word$(line$,3,sp$) :rec$(x,4)=word$(line$,4,sp$)
      name$(x)=rec$(x,1)
      next
      close #a
      if totrec>2 then sort rec$(),totrec,1,4
      gosub [GetPastResults] 'for PastResults display
      calldll #kernel32,"Sleep",100 as ulong,r as void

      'get unique names, to show in Combobox NameList
      pa=0
      for x=1 to totrec
      if rec$(x,1)<>"" then
      in$=""
      for z=1 to pa
      if rec$(x,1)=name$(z)then in$="in"
      next
      if in$<>"in" then pa=pa+1:name$(pa)=rec$(x,1)
      end if
      next
      '----
      calldll #kernel32,"Sleep",100 as ulong,r as void
      '--------------------------------------------------------------------
      'dataFile
      'to get maxTopics and maxQues in each topic (for DIMming)
      tp=0 :mq=0 :tpc=0
      open qzFile$ for input as #w
      while eof(#w)=0 'as long as EndOfFile not reached, continue input
      line input #w, line$
      if line$="t----------" then tp=tp+1 :tq=0
      if line$="q--" then tq=tq+1 :if tq>mq then mq=tq
      wend
      close #w
      dim tpc$(tp), rn(mq), maxq(tp)
      dim qus$(tp,mq), ans$(tp,mq)

      'get all Topics and Qus&Ans for each topic
      open qzFile$ for input as #w
      while eof(#w)=0
      line input #w, pfx$ :pfx$=trim$(pfx$)
      select case pfx$
      case "t----------"
      line input #w, t$ :t$=trim$(t$)
      tpc=tpc+1 :qus=0
      tpc$(tpc)=t$
      case "q--"
      qus=qus+1 :maxq(tpc)=qus
      do
      line input #w, q$ :q$=trim$(q$)
      qus$(tpc,qus)=qus$(tpc,qus)+q$
      loop until q$=""
      case "a--"
      do
      line input #w, a$ :a$=trim$(a$)
      ans$(tpc,qus)=ans$(tpc,qus)+a$
      loop until a$=""
      end select
      wend
      close #w

      'reduce topic to 30 chars
      for x=1 to tpc :tp$=tpc$(x)
      if len(tp$)>30 then tp$=left$(tp$,30)
      spc=31-len(tp$)
      tpc$(x)=tp$+space$(spc)+str$(maxq(x))
      next
      calldll #kernel32,"Sleep",100 as ulong,r as void

      'convert all "\" in dataFile to CrLf$ (manual line break)
      for x=1 to tpc
      for y=1 to maxq(x)
      in$=qus$(x,y) :gosub [parse] :qus$(x,y)=out$
      in$=ans$(x,y) :gosub [parse] :ans$(x,y)=out$
      next
      next
      calldll #kernel32,"Sleep",100 as ulong,r as void
      'ready to start quiz
      '----------------------------------------------------------------------
      WindowWidth = 600:WindowHeight = 465
      UpperLeftX=10 'int((DisplayWidth-WindowWidth)/2)
      UpperLeftY=10 'int((DisplayHeight-WindowHeight)/2)
      readme$="To start Quiz, select a Topic and a Name (or enter a new "+_
      "name), then press [OK] button."+CrLf$+CrLf$+_
      "To create your own quiz, see any QUIZ file in the program folder."
      stylebits #w, 0,_WS_MAXIMIZEBOX,0,0 'no maximize for window
      stylebits #w.qbox, _ES_READONLY, _ES_AUTOHSCROLL, 0, 0
      stylebits #w.abox, _ES_READONLY, _ES_AUTOHSCROLL, 0, 0
      stylebits #w.cmb, 0,_CBS_DROPDOWN or _CBS_AUTOHSCROLL,0,0 'show Name List
      stylebits #w.past,_WS_VSCROLL,_ES_AUTOHSCROLL, 0,_WS_EX_CLIENTEDGE 'blend-in
      stylebits #w.past, _LBS_NOSEL,0,0,0 'no select in Results List

      statictext #w.welcome, "Welcome ...", 5, 5, 155, 25
      statictext #w.readme, readme$, 5, 30, 155, 140
      statictext #w.msgtpc, "Select Topic :", 170, 8, 100, 20
      statictext #w.msgname, "Select or Type-in Your Name : ", 480,10, 125, 35
      statictext #w.msgpast, "Past Results :", 10, 250, 100, 20
      statictext #w.topic, "", 10, 5, 330, 20

      button #w.n, "Name", [byName], UL, 10, 410, 50, 25
      button #w.t, "Topic", [byTopic], UL, 110, 410, 50, 25
      button #w.s, "Score", [byScore], UL, 355, 410, 50, 25
      button #w.d, "Date/Time", [byDate], UL, 430, 410, 80, 25
      button #w.ok, "OK", [tnSelected], UL, 480, 180, 100, 25
      button #w.chng, "Change Quiz", [change], UL, 10, 180, 100, 25

      Listbox #w.Lbx, tpc$(), [tSelected], 170, 27, 295, 180
      Combobox #w.cmb, name$(), [nSelected], 480, 45, 100, 130
      TextboxColor$ = "buttonface"
      Listbox #w.past,past$(),[nothing],10, 270, 575, 135
      textbox #w.qbox, 10, 80, 575, 110
      textbox #w.abox, 10, 190, 575, 210

      button #w.btnyes,"I Know This Answer",[yes],UL,445, 410, 140, 25
      button #w.btnno,"I Didn't Know This",[no],UL,10, 410, 140, 25
      button #w.btnchk,"Show Answer",[btnchk], UL, 10, 410, 100, 25
      button #w.btnagain,"Restart Quiz",[again], UL, 250, 410, 90, 25
      button #w.btnstop,"Stop",[stop], UL, 525, 410, 60, 25
      statictext #w.remain,"", 260, 415, 80, 25
      '-------------------------------------------
      open "Flashcard Quiz" for window as #w
      #w, "font segoe_ui 10 bold":#w, "trapclose [quit]"
      success=SendMessage(hwnd(#w.cmb),_CB_LIMITTEXT,10,0) 'name=10 chars only
      #w.remain, "!font Times_New_Roman 9" :#w.topic, "!font Times_New_Roman 9"
      #w.qbox, "!font mt rounded bold 12"
      #w.abox, "!font ms_reference_sans_serif 12 bold"
      #w.readme, "!font arial 10" :#w.past, "font courier_new 10"
      #w.readme, readme$ :#w.welcome, "!font Segoe_Print bold oblique"
      #w.n, "!font segoe_ui 10" :#w.t, "!font segoe_ui 10"
      #w.s, "!font segoe_ui 10" :#w.d, "!font segoe_ui 10"
      #w.cmb "font segoe_ui 10" :#w.Lbx, "font courier_new 10"
      #w.btnyes,"!hide" :#w.btnno,"!hide" :#w.btnchk,"!hide"
      #w.btnstop,"!hide" :#w.btnagain,"!hide" :#w.qbox, "!hide"
      #w.abox, "!hide" :#w.topic "!hide"
      #w.Lbx, "singleclickselect [tSelected]"
      #w.Lbx, "reload" 'so that scrollbars are active at start
      #w.past, "reload"
      #w.Lbx "select ";prvtopic$
      #w.cmb "select ";prvname$
      [tSelected] 'topic selected
      topic$=""
      #w.Lbx, "selectionindex? tp"
      #w.Lbx, "selection? topic$" :prvtopic$=topic$
      topic$=left$(topic$,30)
      if totrec<2 then #w.n "!hide" :#w.t "!hide" :#w.s "!hide" :#w.d "!hide"
      [nothing]
      wait

      [change]
      close #w
      goto [startQuiz]

      [byName]
      sort rec$(),1,totrec,1 :goto [sorts]
      [byScore]
      sort rec$(),totrec,1,3 :goto [sorts]
      [byTopic]
      sort rec$(),1,totrec,2 :goto [sorts]
      [byDate]
      sort rec$(),totrec,1,4
      [sorts]
      gosub [GetPastResults]
      #w.past, "reload"
      wait

      [nSelected] 'name selected
      name$=""
      #w.cmb "selectionindex? usernr"
      #w.cmb "selection? name$"
      if tp and usernr then #w.ok, "!enable"
      wait

      [tnSelected] 'topic and name selected
      #w.cmb "contents? name$" :prvname$=name$
      if topic$="" then call FlashControl hwnd(#w.msgtpc), 5, 100 :wait
      if name$="" then call FlashControl hwnd(#w.msgname), 5, 100 :wait
      #w.n "!hide" :#w.t "!hide" :#w.s "!hide" :#w.d "!hide"
      #w.msgtpc, "!hide" :#w.msgname, "!hide" :#w.readme, "!hide"
      #w.msgpast, "!hide" :#w.cmb "hide" :#w.welcome, "!hide"
      #w.past, "hide" :#w.ok, "!hide" :#w.chng "!hide"
      #w.Lbx "hide" :#w.topic "!show" :#w.topic qz$+"- ";topic$
      #w.qbox, "!show" :#w.abox, "!show"
      tot=maxq(tp) :done=0 :corr=0 :tries=0
      for pk=1 to tot
      [rndming]
      rdm=1+int(rnd(1)*tot) 'get random question number
      in$=""
      for z=1 to tot
      if rn(z)=rdm then in$="in"
      next
      if in$="in" then [rndming]
      #w.qbox "" :#w.abox ""

      #w.btnyes,"!hide":#w.btnno,"!hide":#w.btnchk,"!hide"
      in$=qus$(tp,rdm):gosub [parse] :qus$=out$
      #w.qbox,qus$ 'show question
      #w.btnchk,"!show" :#w.btnstop,"!show" :#w.remain "!show"
      wait

      [btnchk]
      #w.btnchk,"!hide" :#w.btnstop "!hide"
      #w.btnyes,"!show":#w.btnno,"!show" :#w.remain "!hide"
      in$=ans$(tp,rdm):gosub [parse] :ans$=out$
      #w.abox,ans$ 'show answer
      wait

      [yes]
      corr=corr+1
      tries=tries+1
      goto [nxtqu]

      [no]
      tries=tries+1
      goto [rndming] 'the incorr-answered will be repeated later randomly

      [nxtqu]
      rn(pk)=rdm
      done=done+1
      remain=tot-done:remain$=str$(remain)
      #w.remain," Remaining : "+remain$
      next pk

      [stop]
      #w.qbox "" :#w.abox ""
      if tries=0 or corr=0 then
      sc=0
      else
      sc=(corr*100/tot)*(corr/tries)
      end if
      calldll #kernel32,"Sleep",100 as ulong,r as void
      sc=int(sc) :sc$="00"+str$(sc):score$=right$(sc$,3)
      dt$=date$("mm/dd/yyyy") :dt$=right$(dt$,4)+left$(dt$,2)+mid$(dt$,4,2)
      tm$="":tm$=time$():dt$=dt$+" "+tm$
      #w.abox, CrLf$+CrLf$+space$(19)+"Your Score = ";sc
      #w.remain,"!hide" :#w.msgtpc,"!hide" :#w.btnyes,"!hide" :#w.btnno,"!hide"
      #w.btnchk,"!hide" :#w.btnagain,"!show" :#w.btnstop,"!hide"

      totrec=totrec+1
      rec$(totrec,1)=trim$(name$)
      rec$(totrec,2)=left$(qz$,3)+". "+trim$(topic$) 'eg: Geo-China
      rec$(totrec,3)=trim$(score$)
      rec$(totrec,4)=trim$(dt$)
      gosub [UpDate]
      gosub [GetPastResults]
      #w.past, "reload"
      wait

      [again]
      close #w
      goto [startTopic]

      [quit]
      close #w
      END
      '=====================================================================
      [parse] 'convert any "\" to CrLf$ (manual line break)
      out$=""
      for zz=1 to len(in$) :m$=mid$(in$,zz,1)
      if m$="\" then m$=CrLf$
      out$=out$+m$
      next
      return

      [UpDate]
      'shortlist by name-topic (only show max score for each name-topic)
      currnmtp$=rec$(totrec,1)+rec$(totrec,2):mkc$=rec$(totrec,3):mkc=val(mkc$)
      for x=1 to totrec-1
      recnmtp$=rec$(x,1)+rec$(x,2):mkr$=rec$(x,3):mkr=val(mkr$)
      if recnmtp$=currnmtp$ then
      if mkc>mkr then
      for y=1 to 4:rec$(x,y)="":next
      else
      for y=1 to 4:rec$(totrec,y)="":next
      end if
      end if
      next

      'remove null string entries made above
      new=0
      for x=1 to totrec
      if rec$(x,1)<>"" then new=new+1:for y=1 to 4:rec$(new,y)=rec$(x,y):next
      next
      totrec=new

      'save Records
      open "pmwd.txt" for output as #rec
      for x=1 to totrec
      print #rec,rec$(x,1)+sp$+rec$(x,2)+sp$+rec$(x,3)+sp$+rec$(x,4)
      'sp$=any char to hide spaces, so that can be parsed by word$
      next
      close #rec
      run "attrib +s +h "+"pmwd.txt" 'this is the second hide
      return

      [GetPastResults]
      redim past$(totrec)
      for fm=1 to totrec
      nm$=rec$(fm,1):nmgap=12-len(nm$)
      tp$=rec$(fm,2):if len(tp$)>29 then tp$=left$(tp$,29)+".."
      tpgap=32-len(tp$)
      sc$=rec$(fm,3) :sc$=using("###",val(sc$)) 'right-align
      sclen=len(sc$) :scgap=6-sclen
      dt$=trim$(rec$(fm,4))
      past$(fm)=nm$+space$(nmgap)+tp$+space$(tpgap)_
      +sc$+space$(scgap)+dt$+CrLf$
      next
      return

      'to restrict length of name entry
      function SendMessage(handle, message, wParam, lParam)
      calldll #user32, "SendMessageA", handle as ulong,_
      message as ulong, wParam as ulong, lParam as ulong,_
      SendMessage as ulong
      end function

      'to flash a control
      sub FlashControl Handle,Count,Timeout
      for i = 1 to Count
      calldll #user32, "ShowWindow",Handle as uLong,_SW_HIDE as long,result as long
      call pause 100
      calldll #user32, "ShowWindow",Handle as uLong,_SW_SHOW as long,result as long
      call pause 100
      next
      end sub

      sub pause delay
      stTime = time$("ms")
      while time$("ms")

      'SAMPLE QUIZ FILE
      't=topic, q=question, a=answer, "\"= manual line break
      'To create your Quiz, type out as shown below, using Notepad,
      'then save as ".txt" into the program folder.

      't----------
      'South America

      'q--
      'Which man-made structure in Brazil is one of the new 'Wonders Of The World'?

      'a--
      'The 38m-tall Christ Statue in Rio de Janeiro.

      'q--
      'What is Machu Picchu?

      'a--
      'It is a 15th-century Andes mountain settlement in Peru.

      't----------
      'Middle East

      'q--
      'Which country ruled Algeria for 130 years until 1962?

      'a--
      'France.

      'q--
      'Which is the oldest tomb?

      'a--
      'The Great Pyramid, in Egypt.\\
      'It was built as a tomb for pharaoh Khufu.\\
      'Built around 2560 B.C., it still stands today.

      'EndData (this line optional)
    • green8819
      A friend has pointed out some mistakes . The program itself is fine, unless someone says otherwise. Please make the following corrections. REPLACE 1 LINE: dim
      Message 2 of 6 , Feb 12, 2013
      • 0 Attachment
        A friend has pointed out some "mistakes".
        The program itself is fine, unless someone says otherwise.
        Please make the following corrections.

        REPLACE 1 LINE:
        dim info$(10, 10)
        WITH:
        dim info$(1,1)

        REPLACE 3 LINES:
        'if file exists, then name of file=qz$
        if fileExists(DefaultDir$,qzFile$) then qz$=info$(1,0)
        qz$=info$(1,0) :qzlen=len(qz$) :qz$=mid$(qz$,4,qzlen-7)+ " Quiz"
        WITH:
        'if file exists, then name of file=file$
        if fileExists(DefaultDir$,qzFile$) then file$=info$(1,0):qz$=left$(file$,3)+"."

        REPLACE 1 LINE:
        #w.Lbx "hide" :#w.topic "!show" :#w.topic qz$+"- ";topic$
        WITH:
        #w.Lbx "hide" :#w.topic "!show" :#w.topic word$(file$,1,".")+"-- "+topic$

        Thank you.
      • paradisejb
        I don t find a function fileExists function block of code anywhere in your program. How do you fill your info$ array? Jack
        Message 3 of 6 , Feb 12, 2013
        • 0 Attachment
          I don't find a "function fileExists" function block of code anywhere in your program. How do you fill your info$ array?
          Jack

          --- In libertybasic@yahoogroups.com, "green8819" wrote:
          >
          >
          >
          > A friend has pointed out some "mistakes".
          > The program itself is fine, unless someone says otherwise.
          > Please make the following corrections.
          >
          > REPLACE 1 LINE:
          > dim info$(10, 10)
          > WITH:
          > dim info$(1,1)
          >
          > REPLACE 3 LINES:
          > 'if file exists, then name of file=qz$
          > if fileExists(DefaultDir$,qzFile$) then qz$=info$(1,0)
          > qz$=info$(1,0) :qzlen=len(qz$) :qz$=mid$(qz$,4,qzlen-7)+ " Quiz"
          > WITH:
          > 'if file exists, then name of file=file$
          > if fileExists(DefaultDir$,qzFile$) then file$=info$(1,0):qz$=left$(file$,3)+"."
          >
          > REPLACE 1 LINE:
          > #w.Lbx "hide" :#w.topic "!show" :#w.topic qz$+"- ";topic$
          > WITH:
          > #w.Lbx "hide" :#w.topic "!show" :#w.topic word$(file$,1,".")+"-- "+topic$
          >
          > Thank you.
          >
        • paradisejb
          I added the function, but did not make any of the 3 replacements and the program works as expected.
          Message 4 of 6 , Feb 12, 2013
          • 0 Attachment
            I added the function, but did not make any of the 3 replacements and the program works as expected.

            --- In libertybasic@yahoogroups.com, "paradisejb" wrote:
            >
            > I don't find a "function fileExists" function block of code anywhere in your program. How do you fill your info$ array?
            > Jack
            >
            > --- In libertybasic@yahoogroups.com, "green8819" wrote:
            > >
            > >
            > >
            > > A friend has pointed out some "mistakes".
            > > The program itself is fine, unless someone says otherwise.
            > > Please make the following corrections.
            > >
            > > REPLACE 1 LINE:
            > > dim info$(10, 10)
            > > WITH:
            > > dim info$(1,1)
            > >
            > > REPLACE 3 LINES:
            > > 'if file exists, then name of file=qz$
            > > if fileExists(DefaultDir$,qzFile$) then qz$=info$(1,0)
            > > qz$=info$(1,0) :qzlen=len(qz$) :qz$=mid$(qz$,4,qzlen-7)+ " Quiz"
            > > WITH:
            > > 'if file exists, then name of file=file$
            > > if fileExists(DefaultDir$,qzFile$) then file$=info$(1,0):qz$=left$(file$,3)+"."
            > >
            > > REPLACE 1 LINE:
            > > #w.Lbx "hide" :#w.topic "!show" :#w.topic qz$+"- ";topic$
            > > WITH:
            > > #w.Lbx "hide" :#w.topic "!show" :#w.topic word$(file$,1,".")+"-- "+topic$
            > >
            > > Thank you.
            > >
            >
          • Mike Green
            Hello Jack, Thanks. You are right. The function is missing. Something seemed to have gone wrong when I did the copy/paste in my previous post. Here is the
            Message 5 of 6 , Feb 12, 2013
            • 0 Attachment
              Hello Jack,
              Thanks. You are right. The function is missing.
              Something seemed to have gone wrong when I did the copy/paste in my previous post. Here is the correction:

              PLEASE REPLACE:
              sub pause delay
              stTime = time$("ms")
              while time$("ms") <<<< WEND is missing
              WITH:
              sub pause delay
              stTime = time$("ms")
              while time$("ms")<stTime+delay: wend
              end sub
              function fileExists(path$,filename$)
              files path$, filename$, info$()
              fileExists = val(info$(0, 0))
              end function

              1) "dim info$(1,1)" is enough for this program.
              "dim info$(10, 10)" is too high.

              2) The other two corrections are NOT necessry if the user is saving his quiz files as, for example:
              01-History
              02-Geography

              Instead, if the quiz files are saved as:
              History
              Geography
              then the two corrections ARE necessary.

              Thanks for the feedback. Greatly appreciated.

              To: libertybasic@yahoogroups.com
              From: jburman1860@...
              Date: Tue, 12 Feb 2013 21:38:55 +0000
              Subject: [libertybasic] Re: Flash Card Quiz (fcq46.bas)


























              I added the function, but did not make any of the 3 replacements and the program works as expected.



              --- In libertybasic@yahoogroups.com, "paradisejb" wrote:

              >

              > I don't find a "function fileExists" function block of code anywhere in your program. How do you fill your info$ array?

              > Jack

              >

              > --- In libertybasic@yahoogroups.com, "green8819" wrote:

              > >

              > >

              > >

              > > A friend has pointed out some "mistakes".

              > > The program itself is fine, unless someone says otherwise.

              > > Please make the following corrections.

              > >

              > > REPLACE 1 LINE:

              > > dim info$(10, 10)

              > > WITH:

              > > dim info$(1,1)

              > >

              > > REPLACE 3 LINES:

              > > 'if file exists, then name of file=qz$

              > > if fileExists(DefaultDir$,qzFile$) then qz$=info$(1,0)

              > > qz$=info$(1,0) :qzlen=len(qz$) :qz$=mid$(qz$,4,qzlen-7)+ " Quiz"

              > > WITH:

              > > 'if file exists, then name of file=file$

              > > if fileExists(DefaultDir$,qzFile$) then file$=info$(1,0):qz$=left$(file$,3)+"."

              > >

              > > REPLACE 1 LINE:

              > > #w.Lbx "hide" :#w.topic "!show" :#w.topic qz$+"- ";topic$

              > > WITH:

              > > #w.Lbx "hide" :#w.topic "!show" :#w.topic word$(file$,1,".")+"-- "+topic$

              > >

              > > Thank you.

              > >

              >



















              [Non-text portions of this message have been removed]
            • Stefan Pendl
              ... Might be better to upload a ZIP archive that replaces the previously posted one. Posts can be truncated due to length limitations, that are unknown to the
              Message 6 of 6 , Feb 13, 2013
              • 0 Attachment
                Am 13.02.2013 08:27, schrieb Mike Green:
                >
                > Hello Jack,
                > Thanks. You are right. The function is missing.
                > Something seemed to have gone wrong when I did the copy/paste in my previous post. Here is the correction:
                >

                Might be better to upload a ZIP archive that replaces the previously
                posted one.

                Posts can be truncated due to length limitations, that are unknown to
                the group members.

                In addition uploading files avoids copy and paste errors ;-)


                --
                Stefan Pendl
                http://stefanpendl.runbasichosting.com/

                LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                LB Community Wiki .............. http://basic.wikispaces.com/
                LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                Books at http://www.lulu.com/ and http://www.amazon.com/
                Alyce Watson ... APIs for Liberty BASIC
                Carl Gundel .... Beginning Programming with Liberty BASIC

                Windows 7 Home Premium 64-bit SP1
                AMD Turion X2 RM-70 2GHz, 4GB RAM
              Your message has been successfully submitted and would be delivered to recipients shortly.