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

Join Lines: Special marker for lists?

Expand Messages
  • Clueless in Seattle
    Continued from NTB NextRelease... ... That would work! Can you give me some hints on how to construct it? I would like to add it to my Reformat Web Text clip
    Message 1 of 2 , Sep 3, 2001
    • 0 Attachment
      Continued from NTB NextRelease...

      Jody wrote:

      > For now, a Clip can be built to ignore lines with the * to ignore
      > those lines when Join Lines is useful.

      That would work!

      Can you give me some hints on how to construct it?

      I would like to add it to my Reformat Web Text clip that I use on text
      I copy from web pages.

      > It seems to me it would
      > be just as easy to join the lines above and below the paragraph
      > that you do not want to be joined which is the way I image you do
      > it now. Using a Clip would have to check every line for the
      > asterisk.

      I keep a text file called "Scrapbook" in which I paste text I copy
      from web pages. Each time I paste new text to the Scrapbook I use my
      Reformat Web Text clip to join all the lines and align the text. The
      trouble is, the Reformat clip selects the whole file each time it does
      the reformatting. And so if there are any lists in any of the text
      I've previously pasted, they end up getting joined.

      But if I could add a line or two to my clip that would skip lines
      beginning with an asterisk, then t wouldn't matter if it reformatted
      the whole file would it? I could use the Modify|Lines|Insert Bullets
      command to mark any lists in the text at the time that I add the text
      to the file.

      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
      gazillion; but I'm not far along on learning clip language to
      understand what you meant.

      So for now, the clip to ignore lines beginning with "*" would do the
      trick I think.
    • 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 2 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.