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

[Clip] Clip to create a clip?

Expand Messages
  • michael@fun-da-mentals.com
    I work with the same documents almost continuously and there are a number of functions in these documents which serve as something like landmarks. I ve
    Message 1 of 3 , Feb 10, 2000
    • 0 Attachment
      I work with the same documents almost continuously and there are a
      number of functions in these documents which serve as something like
      landmarks. I've created a clip that will automatically search for a
      particular function (one clip per function) which greatly speeds up the
      process of getting around. I was wondering though if there is a slick
      way of creating a clip automatically. For example, a clip that wold
      take the selected text (eg. a function name) and create my search clip
      for that function OR just print it to the screen and I could just cut
      it and paste it to a new clip. Any ideas?

      Thanks,

      Michael
    • Jody
      Hi Michael, ... Your question is answered at the end of this leaving you Clip on the Clipboard to use Add from Clipboard but I though I d add a tad bit
      Message 2 of 3 , Feb 10, 2000
      • 0 Attachment
        Hi Michael,

        > I was wondering though if there is a slick way of creating a
        > clip automatically. For example, a clip that wold take the
        > selected text (eg. a function name) and create my search clip
        > for that function OR just print it to the screen and I could
        > just cut it and paste it to a new clip.

        Your question is answered at the end of this leaving you Clip
        on the Clipboard to use "Add from Clipboard" but I though I'd
        add a tad bit extra. Does anybody know how to ^!SetListDelimiter
        [ToEmpty]? See the Clip at the bottom and you will understand my
        question.

        You can do that from the Clip Assistant or the upcoming Clipbar.
        Here is one I use off the Clipbar that makes a skeleton Find
        loop. I just have to fill in the blanks. Notice ^!Commands can
        be inserted as one piece, but ^$Functions$ have to be separated
        else NoteTab will execute them, unless you use the preset
        variable ^%Caret% like the second example.

        H=Find Loop I
        ^!SetHintInfo Working...
        ^!SetScreenUpdate Off
        ^!InsertText :Loop^p^!Find "" S^p^!IfError End^p^!Jump Select_^p^!Set %Start%=
        ^!InsertText ^
        ^!InsertText $GetRow$:
        ^!InsertText ^
        ^!InsertText $GetCol$^p
        ^!InsertText ^!Find "" S
        ^!InsertText ^p^!Jump Select_^p^!SelectTo ^
        ^!InsertText %Start%^p^!Goto Loop^p
        ^!Jump -8
        ^!MoveCursor 8
        ^!FocusDoc

        H=Find Loop II
        ^!SetScreenUpdate Off
        ^!InsertText :Loop^p^!Find "" S^p^!IfError End^p^!Jump Select_^p^!Set %Start%=
        ^!InsertText ^%Caret%$GetRow$:^%Caret%$GetCol$^p^!Find "" S
        ^!InsertText ^p^!Jump Select_^p^!SelectTo ^%Caret%%Start%^p^!Goto Loop^p
        ^!Jump -8
        ^!MoveCursor 8
        ^!FocusDoc

        Notice above that I joined some of the lines together. All of
        then can be done like that if you wish. Also note that some
        lines are actual commands w/o ^!InsertText. NoteTab executes
        those. (I think that will work from Quick List but I have not
        tried it. I used the one above it before and never tried
        ^%Caret% in Quick List.)

        Here is one I did yesterday in some code. It is a part of a
        larger Clip that gets the Headings/Topics from and Outline that
        has been inserted as a regular file and creates a search dialog
        to find the topics in the file. The only user input that is
        needed is to get the Outline in focus and choose Add to Clipbook
        on the Clipbooks content menu. You could add code to your's that
        will automatically add the Clip to the Library you are in.

        ^!Set %HeaderList%=^$StrDelete("^%HeaderList%";^$StrSize("^%HeaderList%")$;1)$
        ^!SetClipboard H=^%OutlineName%^%nl%^!Open ^%OutlineTxt%^%nl%^!Set %FindTopic%=^%Caret%?[(H=28)^%OutlineName%==^%HeaderList%]^%nl%^%nl%^%Caret%!SetScreenUpdate Off^%nl%^%nl%^%Caret%!Find "^%Caret%%FindTopic%" SW^%nl%^%Caret%!SetView ^%Caret%$GetRow$:1^%nl%^%Caret%!SetCursor ^%Caret%$GetRow$:1^%nl%

        This is what that looks like as a real Clip. All the variables
        show their contents below except %FindTopic% which is a real one
        in the actual Clip.


        H=^%OutlineName%
        ^!Open ^%OutlineTxt%
        ^!Set %FindTopic%=^?[(H=28)^%OutlineName%==^%HeaderList%]

        ^!SetScreenUpdate Off

        ^!Find "^%FindTopic%" SW
        ; 4.8 command - Nice! Sure beats old methods.
        ^!SetView ^$GetRow$:1
        ^!SetCursor ^$GetRow$:1

        OH, yeah, you had a question didn't you? ;)

        What you would do it take the last one above, hmm, what would you
        do, let's see:

        <--- Copy below this line --->
        H=Find Clip Template
        ; Last Updated 02/10/2000, Sojourner@..., jody
        ; ^!SetListDelimiter ^%Empty%
        ^!SetListDelimiter ~.~.~
        ; long line till blank
        ^!Set %ClipName%=^?{Name clip=^$GetSelection$}; %Word%=^?{Find what=^$GetSelection$}; %Options%=^?{(T=A;H=10)Search options=Do not search for whole words^=T|Search for whole words only^=C|_Ignore character case^=I|Search backwards^=B|Search through all the open documents^=G|_Search through the whole document^=W|Search within selection only^=H|Search using regular expressions^=R|_Do not display any error messages^=S}; %ClipBoard%=^?{==Put on Clipboard^=1|Add to edit window^=}

        ^!IfTrue ^%ClipBoard% Next else Skip_2
        ^!SetClipboard H="^%ClipName%"^%nl%^%Caret%!Find "^%Word%" ^$StrReplace("~.~.~";"";"^%Options%";0;0)$^%nl%
        ^!Goto End
        H="^%ClipName%"^%nl%^%Caret%!Find "^%Word%" ^$StrReplace("~.~.~";"";"^%Options%";0;0)$^%nl%

        <--- Copy above this line, right --->
        <--- click over the Clipbook and --->
        <--- choose "Add from Clipboard" --->

        Happy Clip'n!
        Jody

        http://www.sureword.com/notetab

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@...
        mailto:Ntb-Clips-UnSubscribe@...
        http://www.egroups.com/list/ntb-clips
      • Michael Brock
        Wow! That sure did the trick. With bells, whistles, ribbons, etc. And I have to say, quite humbling. Thanks again, Michael On Thursday, February 10, 2000
        Message 3 of 3 , Feb 10, 2000
        • 0 Attachment
          Wow! That sure did the trick. With bells, whistles, ribbons, etc.
          And I have to say, quite humbling.

          Thanks again,

          Michael

          On Thursday, February 10, 2000 8:50 PM, Jody [SMTP:KJB1611@...]
          wrote:
          > Hi Michael,
          >
          > > I was wondering though if there is a slick way of creating a
          > > clip automatically. For example, a clip that wold take the
          > > selected text (eg. a function name) and create my search clip
          > > for that function OR just print it to the screen and I could
          > > just cut it and paste it to a new clip.
          >
          > Your question is answered at the end of this leaving you Clip
          > on the Clipboard to use "Add from Clipboard" but I though I'd
          > add a tad bit extra. Does anybody know how to ^!SetListDelimiter
          > [ToEmpty]? See the Clip at the bottom and you will understand my
          > question.
          >
          > You can do that from the Clip Assistant or the upcoming Clipbar.
          > Here is one I use off the Clipbar that makes a skeleton Find
          > loop. I just have to fill in the blanks. Notice ^!Commands can
          > be inserted as one piece, but ^$Functions$ have to be separated
          > else NoteTab will execute them, unless you use the preset
          > variable ^%Caret% like the second example.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.