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

5835Re: [Clip] OTL

Expand Messages
  • Lotta
    Feb 18, 2001
      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!

      ---------- COPY BELOW ----------

      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

      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$
      ^!Set %curr%=^$GetRow$
      ^!If "^$Calc(^%curr%-1)$" > 1 next else getit
      ^!Jump ^$Calc(^%curr%-1)$
      ^!InsertText |
      ^!Jump line_end
      ^!InsertText ^%caret%=^$GetRow$
      ^!Goto loop1
      ^!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"
      ^!Toolbar Select All
      ^!Replace "";"" >> "^p" HSA
      ^!Replace """ >> "" HSA
      ^!Set %cntlns%=^$GetLineCount$
      ^!Jump ^%cntlns%
      ^!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
      ^!Open ^%newotl%
      ^!SetFocus Outline
      ^!Keyboard Ctrl+Alt+Down

      ---------- COPY ABOVE ----------
    • Show all 13 messages in this topic