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

5862Re: [Clip] OTL

Expand Messages
  • David McIntosh
    Feb 22, 2001
      hI
      I tried your clip a few odds things
      1. I like the way you can select which heading ,I tried this on a small
      otl
      would not be good on a large otl of say 200 heading,
      2.the selected heading were not transferred across to the new otl.
      thanks for having a go
      THANKYOU DAVE

      Lotta wrote:
      >
      > Hi David,
      >
      > >Does anyone now a way to cut and paste MORE THAN ONE heading in a otl
      > >withoutchanging it to text format first.
      >
      > I've been thinking in those lines too. Your question got me going. Here is
      > here result of a day's work and an aching back. It isn't an elegant
      > solution but it's kind of fun. (Don't laugh, Jody!)
      >
      > This clip copies the topics of your choice to another OTL. If you want them
      > deleted from the first document, adding the line "^!Keyboard Shift+F10 r"
      > after each ""^!Keyboard Shift+F10 c" should work. Please read the
      > "ReadFirst" before you run it. The first line in "Topics to..." is long.
      >
      > Have fun!
      > Lotta
      >
      > ---------- COPY BELOW ----------
      >
      > H=";ReadFirst"
      > 1. Focus the OTL you want to copy topics TO. Right click it's tab and "Copy
      > Name". When you run the clip, you will be prompted for the name and can
      > paste it into the wizard field.
      >
      > 2. Focus the OTL you want to copy topics FROM before running the clip.
      >
      > 3. Also focus the topic/heading UNDER which you want the new topics to be
      > inserted.
      >
      > H="Topics to other OTL"
      > ^!Set %newotl%="^?[Enter the name of the OTL you want the topics to be
      > added TO]"
      > ^!SetFocus Outline
      > ^!Set %oldotl%=^$GetDocIndex$
      > ^!Set %count%=^$GetTopicCount$
      > ^!Keyboard Shift+F10 t
      > ^!Toolbar Paste New
      > ^!SetWordWrap OFF
      > ^!Set %scrap%=^$GetDocIndex$
      > ^!Jump ^%count%
      > ^!InsertText |
      > ^!Jump line_end
      > ^!InsertText ^%caret%=^$GetRow$
      > :loop1
      > ^!Set %curr%=^$GetRow$
      > ^!If "^$Calc(^%curr%-1)$" > 1 next else getit
      > ^!Jump ^$Calc(^%curr%-1)$
      > ^!InsertText |
      > ^!Jump line_end
      > ^!InsertText ^%caret%=^$GetRow$
      > ^!Goto loop1
      > :getit
      > ^!Jump text_start
      > ^!Jump line_end
      > ^!InsertText ^%caret%=^$GetRow$
      > ^!Select All
      > ^!Keyboard Ctrl+J
      > ^!Replace "^p" >> ""
      > ^!Replace " |" >> "|" WAS
      > ^!Select All
      > ^!Set %wiztxt%=^$GetSelection$
      > ^!Toolbar Clear All
      > ^!SetWizardTitle "Choose the topics to be copied"
      > ^?{(H=^%count%;T=A)=^%wiztxt%}
      > ^!Toolbar Select All
      > ^!Replace "";"" >> "^p" HSA
      > ^!Replace """ >> "" HSA
      > ^!Set %cntlns%=^$GetLineCount$
      > ^!Jump ^%cntlns%
      > :loop2
      > ^!Select Line
      > ^!Set %index%=^$GetLine$
      > ^!SetDocIndex ^%oldotl%
      > ^!Delay 02
      > ^!SetTopicIndex ^%index%
      > ^!SetFocus Outline
      > ^!Keyboard Shift+F10 c
      > ^!Open ^%newotl%
      > ^!SetFocus Outline
      > ^!Keyboard Shift+F10 d
      > ^!Keyboard Ctrl+Alt+Up
      > ^!SetDocIndex ^%scrap%
      > ^!Set %nmbr%=^$GetRow$
      > ^!If "^$Calc(^%nmbr%-1)$" > 0 next else clnup
      > ^!Jump ^$Calc(^%nmbr%-1)$
      > ^!Goto loop2
      > :clnup
      > ^!DestroyDoc
      > ^!Open ^%newotl%
      > ^!SetFocus Outline
      > ^!Keyboard Ctrl+Alt+Down
      >
      > ---------- COPY ABOVE ----------
      >
    • Show all 13 messages in this topic