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

Re: clip to return topic headings and number of lines in each topic?

Expand Messages
  • note_ed
    ... list into ... in each ... Jonathan, I think this should solve your problem... H= Analyse OTL 2 ;Check this clip can be run ^!Clip
    Message 1 of 5 , Dec 14, 2001
    • 0 Attachment
      --- In ntb-clips@y..., "Jonathan Woodbridge" <jwmail@m...> wrote:
      > Can anyone point me to a clip that will take a focused outline and
      list into
      > a new document the headings in the outline and the number of lines
      in each
      > topic?




      Jonathan,

      I think this should solve your problem...

      <-- Clips start here -->

      H="Analyse OTL 2"
      ;Check this clip can be run
      ^!Clip "Check Is OTL"
      ;Show a message and disable screen updating
      ^!StatusShow Calculating...
      ^!SetScreenUpdate OFF
      ;Select the first topic
      ^!SetTopicIndex 1
      ;Store the reults
      ^!Result Outline File = ^$GetDocName$^%NL%^%NL%
      :TOPIC_LOOP
      ;Append the next results line
      ^!Result ^%Result%Topic (^$GetTopicIndex$) ^$GetTopicName$:
      ^$GetLineCount$ Lines.^%NL%
      ;If we are about to try and select a topic beyond the end of the
      document, exit the loop
      ^!If ^$Calc(^$GetTopicIndex$+1)$>^$GetTopicCount$ TOPIC_LOOP_END
      ;Select the next topic
      ^!SetTopicIndex ^$Calc(^$GetTopicIndex$+1)$
      ^!Goto TOPIC_LOOP
      :TOPIC_LOOP_END
      ;Select the first topic
      ^!SetTopicIndex 1
      ;Create a new document
      ^!Toolbar New Document
      ;Insert the data
      ^!InsertText ^%Result%
      ;Refresh the screen
      ^!SetScreenUpdate ON

      H="_Check Is OTL"
      ;If its an outline document, exit this clip
      ^!If ^$IsOutlineDoc$=1 END
      ;Warn the user then terminate
      ^!Prompt This clip may only be run against outline documents
      ^!Goto EXIT

      <-- Clips end here -->

      Regards,

      Stephen.
    • Jonathan Woodbridge
      Thanks, Jody for your suggestions, but your clip just outputted a list of topic headings. What I wanted was something like Stephen s clip (thanks, Stephen!)
      Message 2 of 5 , Dec 14, 2001
      • 0 Attachment
        Thanks, Jody for your suggestions, but your clip just outputted a list of
        topic headings. What I wanted was something like Stephen's clip (thanks,
        Stephen!) which I managed to put together myself just before I saw your
        post. I've incorporated some of your formatting and other touches into the
        one I made, which has made it nicer. I've already used it to start trimming
        the hidden fat out of my outlines.

        thanks again,

        Jonathan
      • Jody
        Hi Jonathan, Now this is one that I misread the Subject line. I read it as number the headings . I wondered why Stephen s Clip looked so complicated for
        Message 3 of 5 , Dec 14, 2001
        • 0 Attachment
          Hi Jonathan,

          Now this is one that I misread the Subject line. <g> I read it as
          "number the headings". I wondered why Stephen's Clip looked so
          complicated for such a simple task. ;-> I'm glad you were able to get something out of my Outline Library that I guess you are referring to.
          I like the Outline to frames Clip myself. If you haven't tried
          that one use it on Help | NoteTab's Glossary. I think there is
          one heading that gets messed up because of the code in the
          Outline. It will give you a good idea of how it works. Try out
          Readme.otl also and the Clip to make the web page so that you
          can go forward and backwards from each heading (an item in
          frames), but a page for each heading in the Clip that does not make
          frames.

          http://www.notetab.net/zip/outline.zip

          >Thanks, Jody for your suggestions, but your clip just outputted a
          >list of topic headings. What I wanted was something like
          >Stephen's clip (thanks, Stephen!) which I managed to put together
          >myself just before I saw your post. I've incorporated some of
          >your formatting and other touches into the one I made, which has
          >made it nicer. I've already used it to start trimming the hidden
          >fat out of my outlines.


          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@yahoogroups.com
          mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
          http://groups.yahoo.com/group/ntb-clips
        Your message has been successfully submitted and would be delivered to recipients shortly.