Copying text from LC Script Editor

J. Landman Gay jacque at hyperactivesw.com
Fri Sep 16 15:28:50 EDT 2016


On 9/16/16 11:06 AM, Jim MacConnell wrote:
> I have a similar issue with Windows 7 Pro (LC 8.1 Community)...
> I also can't copy and paste directly into applications other than a simple
> text editor (NotePad). I can then copy and paste from NotePad to wherever I
> want to go (PowerPoint, Word, etc.) with no issues.
>
> My problem also occurs trying to copy text from fields.
>
> Saving the text to file and opening works fine so sure seems to be an LC 8
> clipboard issue.

My hunch is that it's a line-ending translation issue. LC auto-corrects 
line endings when importing/exporting text to files but I don't think it 
does the same for the clipboard. I'm not sure how it could; it has no 
idea where you intend to paste. If you paste into another LC field, you 
don't want any translation.

It sounds like you'd need a custom clipboard function that could live in 
a front or backscript. It would get the clipboardData["text"] and 
replace LF with CRLF, or CR, or whatever your receiving app expects. The 
double-pass you and Richmond need to do probably works because the plain 
text editor does the line ending replacements.

There may also be an issue with UTF16 vs UTF8. LC uses UTF16, some apps 
expect UTF8, but many will accomodate either.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list