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

Limit Reformatting to Copied Text WAS: Join Lines: Special marker for lists?

Expand Messages
  • Clueless in Seattle
    ... Thanks Hugo! That s great! I m sure it will do the trick. But I m not sure that including those Replace operation in the clip for reformatting text
    Message 1 of 2 , Sep 4, 2001
    • 0 Attachment
      h.paulissen@... wrote:

      > ^!Replace "*" >> "^P*" AWS
      > ^!Select ALL
      > ^$StrFormat(^$GetSelection$;0;70;True)$
      > ^!Replace "^P*" >> "*" AWS

      Thanks Hugo! That's great! I'm sure it will do the trick.

      But I'm not sure that including those "Replace" operation in the clip
      for reformatting text copied from a web page is a good idea. The
      reason I say this is because the text copied from the web page won't
      have the asterisks markers already inserted in the lists. I'll have
      to add those to the text after it has been pasted into a text file,
      won't I?

      Here's the clip as you wrote it:

      ^!Set %NewText%=^$StrReplace("*";"^P*";^$GetClipboard$;False;False)$
      ^!Set %NewText%=^$StrFormat(^%NewText%;0;70;True)$
      ^!Set %NewText%=^$StrReplace("^P*";"*";^%NewText%;False;False)$
      ^%NewText%

      So, what would the clip look like if you took out the parts that
      insert and remove the paragraph markers? I've looked at it and tried
      to figure out how to remove them, but I don't know enough about clip
      language to know what to take out and what to leave in.

      I want to see the clip without those "Replace" operations so I can
      study it, and the one Jody wrote, to try to understand what each part
      of the clip is doing. So I want to strip it down to it's most elegant
      form.

      Then after I've studied it, I'm sure I'll be back with more questions.
    • h.paulissen@facburfdcw.unimaas.nl
      Hi Clueless, ^$StrFormat(^$GetClipboard$;0;70;True)$ This would do the trick; all replace commands are removed and you don t need the variable to work with the
      Message 2 of 2 , Sep 5, 2001
      • 0 Attachment
        Hi Clueless,


        ^$StrFormat(^$GetClipboard$;0;70;True)$

        This would do the trick; all replace commands are removed and you
        don't need the variable to work with the content of the clipboard
        anymore...

        The Replace-commands were in there since you asked for a way to
        overcome the problem of the bulleted lists being joined together.

        If I may: I don't understand why you do the (re-)formatting of your
        text while surfing/copying/pasting. In my opinion it would be better
        and easier to do it afterwards. You'll have a document with some
        grabbed pieces of information (if PasteBoardDivider is set you can
        actually see the break between two parts) and from there it is easier
        to reformat the complete document.

        Just a thought...


        Hugo

        --- In ntb-clips@y..., Clueless in Seattle <clueless@o...> wrote:

        >
        > Here's the clip as you wrote it:
        >
        > ^!Set %NewText%=^$StrReplace
        ("*";"^P*";^$GetClipboard$;False;False)$
        > ^!Set %NewText%=^$StrFormat(^%NewText%;0;70;True)$
        > ^!Set %NewText%=^$StrReplace("^P*";"*";^%NewText%;False;False)$
        > ^%NewText%
        >
        > So, what would the clip look like if you took out the parts that
        > insert and remove the paragraph markers? I've looked at it and
        tried
        > to figure out how to remove them, but I don't know enough about clip
        > language to know what to take out and what to leave in.
        >
        > I want to see the clip without those "Replace" operations so I can
        > study it, and the one Jody wrote, to try to understand what each
      Your message has been successfully submitted and would be delivered to recipients shortly.