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

Using ^$GetDocListAll$ in an outline document

Expand Messages
  • joy8388608
    From what I can see, commands such as ^$Replace$ work on multiple topics of an outline but others like ^$GetDocListAll$ only work on the text in the current
    Message 1 of 4 , Nov 16, 2012
    View Source
    • 0 Attachment
      From what I can see, commands such as ^$Replace$ work on multiple topics of an outline but others like ^$GetDocListAll$ only work on the text in the current outline topic.

      Some ways of getting ^$GetDocListAll$ to work on ALL text in an outline are clip code to loop through all the topics, code to copy all topics to a new, temp doc and work on that, maybe code to save the outline as a temp file and rename ext to .txt then open that and work on it, etc.

      Has anyone found a nicer way of doing this?
      How about a new setting to allow ^$GetDocListAll$ to work on one topic or ALL topics in an outline?

      Thanks,
      Joy
    • flo.gehrke
      ... Hi Joy, I wouldn t loop through all the topics. Open any sample OTL and try this... ^!SetScreenUpdate Off ^!Toolbar New Document
      Message 2 of 4 , Nov 16, 2012
      View Source
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@...> wrote:
        >
        > Some ways of getting ^$GetDocListAll$ to work on ALL text in an
        > outline are clip code to loop through all the topics, code to
        > copy all topics to a new, temp doc and work on that, maybe code
        > to save the outline as a temp file and rename ext to .txt then
        > open that and work on it, etc.
        >
        > Has anyone found a nicer way of doing this?

        Hi Joy,

        I wouldn't loop through all the topics. Open any sample OTL and try this...

        ^!SetScreenUpdate Off
        ^!Toolbar New Document
        ^$GetFileText(^$GetDocumentPath$SAMPLE.OTL)$
        ^!Select All
        ^!InsertText ^$GetDocListAll("Search pattern";$0\r\n)$

        You will see the output immediately in a second document.

        Regards,
        Flo
      • Ian NTnerd
        I Like it! Nice solution. Also learned about ^$GetDocListAll$. How had I missed that great function? Ian ... [Non-text portions of this message have been
        Message 3 of 4 , Nov 17, 2012
        View Source
        • 0 Attachment
          I Like it!

          Nice solution. Also learned about ^$GetDocListAll$. How had I missed
          that great function?

          Ian

          On 17/11/2012 8:46 AM, flo.gehrke wrote:
          > Hi Joy,
          >
          >
          > I wouldn't loop through all the topics. Open any sample OTL and try
          > this...
          >
          > ^!SetScreenUpdate Off
          > ^!Toolbar New Document
          > ^$GetFileText(^$GetDocumentPath$SAMPLE.OTL)$
          > ^!Select All
          > ^!InsertText ^$GetDocListAll("Search pattern";$0\r\n)$
          >
          > You will see the output immediately in a second document.
          >
          > Regards,
          > Flo
          >
          >



          [Non-text portions of this message have been removed]
        • joy8388608
          ... Hi Flo, Thanks for the good idea. I didn t think about using GetFileText for returning the entire .otl file as text so that works great. There still is the
          Message 4 of 4 , Nov 19, 2012
          View Source
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
            >
            > --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@> wrote:
            > >
            > > Some ways of getting ^$GetDocListAll$ to work on ALL text in an
            > > outline are clip code to loop through all the topics, code to
            > > copy all topics to a new, temp doc and work on that, maybe code
            > > to save the outline as a temp file and rename ext to .txt then
            > > open that and work on it, etc.
            > >
            > > Has anyone found a nicer way of doing this?
            >
            > Hi Joy,
            >
            > I wouldn't loop through all the topics. Open any sample OTL and try this...
            >
            > ^!SetScreenUpdate Off
            > ^!Toolbar New Document
            > ^$GetFileText(^$GetDocumentPath$SAMPLE.OTL)$
            > ^!Select All
            > ^!InsertText ^$GetDocListAll("Search pattern";$0\r\n)$
            >
            > You will see the output immediately in a second document.
            >
            > Regards,
            > Flo
            >

            Hi Flo,
            Thanks for the good idea. I didn't think about using GetFileText for returning the entire .otl file as text so that works great.

            There still is the problem of functions such as ^$GetDocReplaceAll$ which only works on the current outline topic. But I found that adding two lines such as

            ^!Save AS "C:\<origfolder>\<origfilename>.otl"
            ^!ToolBar Reload Document

            works pretty well as long as you don't accidentally overwrite the original doc if that was not the intent.

            Joy
          Your message has been successfully submitted and would be delivered to recipients shortly.