Join Lines: Special marker for lists?
- Continued from NTB NextRelease...
> For now, a Clip can be built to ignore lines with the * to ignoreThat would work!
> those lines when Join Lines is useful.
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 wouldI keep a text file called "Scrapbook" in which I paste text I copy
> 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
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.
- 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
^!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?Maybe you could use GetCLipboard for that: first copy the text that
> 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
you want to format and then do the reformat...
Building on the same idea as above:
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,