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

[Clip] Re: Statistics on multi-word phrases - Fixed

Expand Messages
  • Jody
    Hi Webmaster, I wrote: You can type in up to eleven words or select the phrase. I had it right in front of my nose about how to know how many words were in
    Message 1 of 1 , Sep 3, 1999
    • 0 Attachment
      Hi Webmaster,

      I wrote:
      "You can type in up to eleven words or select the phrase."

      I had it right in front of my nose about how to know how many
      words were in all the time and did not see it till I walked away
      for awhile and then said, duh! Append back at the point where I
      find each word in the array and not make a count thing like I
      did. for some stupid reason I was thinking it would get
      overwritten each pass.

      Charles R. sent me one he sent you after I posted via ICQ, but it
      used a different method in many parts than mine so I could not
      use his method of the final output.

      Well, you have two of them now. :) I fixed a bug in this though
      that was causing it not to start at the cursor position when you
      optioned for that.

      <--- Copy below this line --->
      H=Phrase/Word Count
      ; 09/03/1999, Ntb-Clips@..., jody

      ^!ClearVariables

      ^!Set %Count%=0; %PhraseCount%=0; %FindCount%=0; %ListCount%=0; %n%=1
      ^!SetListDelimiter ^%Space%
      ; One line till SetHint...
      ^!Set %Criteria%=^?{Select phrase or type in - add spaces between words=^$GetSelection$}; %Start%=^?{Start at beginning of doc==_Yes|No}
      ^!SetHintInfo Searching...
      ^!SetScreenUpdate Off

      ^!IfFalse ^%Start% Skip
      ^!Jump 1
      ^!Jump Select_Start
      ^!Set %CurPos%=^$GetRow$:^$GetCol$

      :Phrase
      ^!Find "^%Criteria%" S
      ^!IfError SetArray
      ^!Inc %PhraseCount%
      ^!Goto Phrase

      :SetArray
      ^!If ^%PhraseCount% = 0 Error
      :DoAnyway
      ^!SetArray %FindList%=^%Criteria%
      ^!Set %Count%=^%FindList0%
      ^!Set %Index%=0

      :StartArray
      ^!IfTrue ^%Start% Skip_2
      ^!SetCursor ^%CurPos%
      ^!Goto Skip
      ^!Jump 1
      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Info

      :Word
      ^!Find "^%FindList^%Index%%" S
      ^!IfError Skip_2
      ^!Inc %FindCount%
      ^!Goto Word

      ^!Append %MasterList%=^%FindList^%Index%% = ^%FindCount%^%nl%
      ^!Inc %n%
      ^!Set %FindCount%=0
      ^!Goto StartArray

      :Info
      ^!Info [L]Total Search Data^p^p^%Criteria% = ^%PhraseCount%^p^p^%MasterList%
      ^!Goto End

      :Error
      ^!Skip [^%Criteria%] was not found in the document - uh, wrong file perhaps? <g> Search the file anyway?
      ^!Goto End
      ^!Goto DoAnyway

      Happy Clip'n!
      Jody

      The NoteTab Clip List...
      mailto:Ntb-Clips-Subscribe@...
      mailto:Ntb-Clips-UnSubscribe@...
    Your message has been successfully submitted and would be delivered to recipients shortly.