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

Re: Navigate Outline Clip

Expand Messages
  • Sheri
    ... Great, glad that helped! Here s a couple more little hints, ... 1. There are ^!IfTrue and ^!IfFalse commands, which would be slightly more direct than
    Message 1 of 6 , Mar 11, 2009
    View Source
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "vanwasdi" <dirk.vanwassenhove@...> wrote:
      >
      > This was very helpful! Thank you!
      > Dirk
      >
      > ADAPTED CLIP
      > -------------------------------------------------
      > H="Navigate Outline"
      > ;check if outline if not end
      > ^!If ^$IsOutlineDoc$ = 1 Skip_2 ELSE Next
      > ^!Info No outline! Clip stops.
      > ^!Goto End
      >
      > ;save document
      > ^!Save
      >
      > ;loop to gather topic headings
      > ^!Set %Counter%=1
      > ^!Set %Headings%=
      > :GatherHeadings
      > ^!If ^%Counter% > ^$GetTopicCount$ SortHeadings
      > ^!Set %Headings%=^%Headings%^$GetTopicName(^%Counter%)$|
      > ^!Inc Counter
      > ^!GoTo GatherHeadings
      >
      > :SortHeadings
      > ^!Set %Headings%=^$StrSort("^%Headings%";False;True;False)$
      >
      > ;wizard
      > ^!SetWizardWidth 150
      > ^!Set %ChoosenHeading%=^?{(T=L;H=34)Which heading=_^%Headings%}
      >
      > ;goto choosen headng
      > ^!TopicShow "^%ChoosenHeading%"
      > ^!FocusDoc
      >
      > ;clear variables
      > ^!ClearVariable ^%Counter%
      > ^!ClearVariable ^%Headings%
      > ^!ClearVariable ^%ChoosenHeading%
      >

      Great, glad that helped! Here's a couple more little hints,

      > ^!If ^$IsOutlineDoc$ = 1 Skip_2 ELSE Next

      1. There are ^!IfTrue and ^!IfFalse commands, which would be slightly more direct than plain ^!If in this case.

      2. For performance, you can set the status text before and after your loop. Otherwise the status text is constantly updating and if there are many topics that can actually slow down the execution.

      For example, before :GatherHeadings, use

      ^!SetHintInfo Getting Headers

      and then in the next section, :SortHeadings, use

      ^!SetHintInfo

      With that change, I don't think you'll notice any difference in speed between your loop and the previous clip's grabbing all topics at once from the clipboard.

      Regards,
      Sheri
    • vanwasdi
      Final version. Many thanks to Sheri. Dirk CLIP ... H= Navigate Outline ;pops up a wizard with outline headings sorted in ascending order ;allows to navigate
      Message 2 of 6 , Mar 13, 2009
      View Source
      • 0 Attachment
        Final version. Many thanks to Sheri.
        Dirk

        CLIP
        -------------------------------------------------
        H="Navigate Outline"
        ;pops up a wizard with outline headings sorted in ascending order
        ;allows to navigate with keyboard (e.g. first caracter of heading, ;PageUp/PageDown)
        ;thanks to Sheri for the helpful suggestions
        ;http://tech.groups.yahoo.com/group/ntb-clips/message/19011

        ;check if outline if not end
        ^!IfTrue ^$IsOutlineDoc$ Outline ELSE Next
        ^!Info No outline! Clip stops.
        ^!Goto End

        :Outline


        ;loop to gather topic headings
        ^!Set %Counter%=1
        ^!Set %Headings%=

        ;For performance, you can set the status text before and after your
        ;loop. Otherwise the status text is constantly updating and if there
        ;are many topics that can actually slow down the execution.
        ^!SetHintInfo Getting Headers
        :GatherHeadings
        ^!If ^%Counter% > ^$GetTopicCount$ SortHeadings
        ^!Set %Headings%=^%Headings%^$GetTopicName(^%Counter%)$^%NL%
        ^!Inc Counter
        ^!GoTo GatherHeadings


        :SortHeadings
        ^!SetHintInfo
        ;sort headings
        ^!Set %Headings%=^$StrSort("^%Headings%";False;True;False)$
        ;replace hard returns with | to prepare for wizard
        ^!Set %Headings%=^$StrReplace("^p";"|";"^%Headings%";True;False)$

        ;wizard
        ;underscore necessary for navigation
        ;Notetab currently restricts the heigth of the wizard to 34
        ^!SetWizardWidth 150
        ^!Set %ChoosenHeading%=^?{(T=L;H=34)Which heading=_^%Headings%}

        ;goto choosen headng
        ^!TopicShow "^%ChoosenHeading%"
        ^!FocusDoc

        ;clear variables
        ^!ClearVariable ^%Counter%
        ^!ClearVariable ^%Headings%
        ^!ClearVariable ^%ChoosenHeading%
      • hsavage
        ... Citizen matrix printer, to avoid this expensive problem. ... Brito, Larry is probably correct, you will have to download the printer-drivers if you have
        Message 3 of 6 , Mar 14, 2009
        View Source
        • 0 Attachment
          abetsent wrote:
          > Friends,
          >
          > I always used a HP ink jet printer with ntp, all ok.
          >
          > Because I use an expensive ink cartridge every 15 days, I purchased a
          Citizen matrix printer, to avoid this expensive problem.
          >
          > Brito

          Brito,

          Larry is probably correct, you will have to download the printer-drivers
          if you have any hope of getting it to work correctly.

          You can Google Citizen Printers or follow this link to a driver download
          page.

          http://www.driverfiles.net/Printers/Citizen/page,level2,389,12,resultpage1.html
          --
          ·············································
          ºvº SL_day# 073 - created 2009.03.14_08.58.59

          *DROVE TOO LONG*
          • *DRIVER SNOOZING*
          • *WHAT HAPPENED*
          • *NEXT IS NOT AMUSING*
          • *BurmaShave*

          € hrs € hsavage € pobox € com
        Your message has been successfully submitted and would be delivered to recipients shortly.