When I try to copy the following text from Pan X…
and paste it into an email, the result is this:
I would like the pasted text to have the same line breaks as the original text in Pan X. How might I accomplish this?
I might do this: write a procedure and insert it in the Ship To: label (assuming that is a Text Display object) like this (with your field names inserted):
clipboard()=CompanyName+cr()+Address+cr()+City+" "+State+" "+Zip
I would probably surround this with if double-click()/endif so it only copies when you double-click the label.
Maybe you have a clipboard-modifying utility installed on your Mac e.g. Pure Paste by Sindre Sorhus; so your clipboard is getting “cleaned” and only plain text comes through. If so, you have two options: Switch off “Automatic Cleaning” or explicitly exclude Panorama X in that app’s preferences.
Thank you. I don’t have a program like the one you describe. Could there be a setting in Mac OS that is scrubbing the text?
Thank you. Yes, I might add a short procedure into the Ship To.
The problem may be with the email program. The line breaks in Panorama are most likely line feeds. The email program may be using crlf (carriage return plus line feed). You may have to do some replacing, once you have determined what characters these are.
You are correct. The issue only occurs when using Apple Mail.
It seems your shipping address uses vertical tabs (ASCII 11) between the lines of text.
If I run any of these lines of Panorama X code:
clipboard="A"+cr()+"B" // line-break is carriage return (ASCII 13)
clipboard="A"+lf()+"B" // line-break is line feed (ASCII 10)
clipboard="A"+crlf()+"B" // line-break is carriage return & line feed
then paste into a Mail window, the result is
as I would hope.
However, if I run:
clipboard="A"+vtab()+"B" // line-break is vertical tab (ASCII 11)
then the pasted result is
replace(string,vtab(),lf()) to convert the vertical tabs to carriage returns or (preferably, on Mac OS X or macOS) linefeeds respectively, before copying to the clipboard and pasting into Mail.
In the last example in that last post, it was supposed to show the box character (indicating an invalid character) between A and B. This is how it appears here when pasted into Mail and when composing my forum post, just as in your original screenshot, but in sending the post the forum appears to have cleaned it up and removed it.
Moral: vertical tabs are best avoided altogether — except, for instance, as the occasional Panorama X array separator!