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

Re: Join Lines: Special marker for lists?

Expand Messages
  • h.paulissen@facburfdcw.unimaas.nl
    Hello Clueless, I don t know how your original clip looks like, nor how you want the text to be outputted, but this little clip will do something as you have
    Message 1 of 2 , Sep 4, 2001
    • 0 Attachment
      Hello Clueless,

      I don't know how your original clip looks like, nor how you want the
      text to be outputted, but this little clip will do something as you
      have in mind:

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

      - The first line inserts an extra linebreak before the *-chars - so
      these lines will not be affected by the StrFormat-command,

      - the second and the third do the formatting of the text (maybe you
      use something different?).
      0 = no left-margin
      70 = rightmargin (so to speak)
      True = Justify

      - and the last one removes the extra space in front of the *

      > Can you give me some hints on how to construct it?
      > the reformatting. And so if there are any lists in any of the text
      > I've previously pasted, they end up getting joined.
      >
      >
      > P.S. A while back you said it would be possible to have my Reformat
      > clip, act only on the text that I was actually pasting into the
      > Scrapbook each time. But I didn't understand how to do it. I think
      > you said I could use the OnClipboardChange and a margin of 9999


      Maybe you could use GetCLipboard for that: first copy the text that
      you want to format and then do the reformat...
      ^$StrFormat(^$GetClipboard$;0;70;True)$

      Building on the same idea as above:

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

      You have copied from a webpage, so the clipboard is full with the
      information you want to paste/format. Then:
      1. The contents of the clipboard are copied to Variable NewText (with
      an added Paragraph Mark in front of *
      2. Variable NewText is reformatted
      3. The Extra Paragraph Markers in NewText are removed again
      4. The contents of NewText are pasted to your document...

      Hope this helps,

      Hugo
    Your message has been successfully submitted and would be delivered to recipients shortly.