Problem pasting from Livecode to Mac Mail

Paul Hibbert paul at livecode.org
Wed Jan 10 11:53:43 EST 2018


This works for me with LC9.0.0(dp11) on MacOS High Sierra 10.13.2:

   lock the clipBoard
   put the clipboardData["text"] into tClip
   set the clipBoardData to empty
    -- OSX
   set the rawClipboardData["public.utf8-plain-text"] \
         to textEncode(tClip, "UTF-8" )
   unlock the clipBoard
   -- Now Go Paste in Apple Mail

For an in-depth explanation check the “rawClipboardData" in the dictionary.

Hope this helps.

Paul


> On Jan 10, 2018, at 7:20 AM, Richard Burkett via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Thanks for the suggestion, Jacqueline, but it didn’t change anything. Anyone else have a script-based solution to make sure LiveCode pastes only plain text? ASCII, Native, MacRoman - none of those text encodings work. 
> Even putting only this line in my script results in the same thing:
> set the clipboarddata to ( "blah" & lf & "blah" & lf & "blah" & cr & "blah" & cr & "blah" & return & "blah" )
> 
> What’s different about text set in the clipboard in LiveCode from other text copied from other Mac apps?
> 
> Richard Burkett
> richard.burkett at sbcglobal.net
> 
>> On 1/9/18 12:09 PM, Richard Burkett via use-livecode wrote:
>>> Does anyone have a solution to this problem: I set the clipboard in LiveCode to the text of a field or variable that has returns after each line. When I paste that into Mac Mail, the text appears double-spaced as if it has two returns, but clearly there is just one (or a combination of CR and LF?). I?ve tried all the keys for setting the clipboard and also writing a script to delete line feeds, or CR characters, but nothing works. It?s either no returns, or what appears to be double-spaced returns.
>>> 
>>> If I paste the text first into Text Edit, then copy it, and paste into Mac Mail it?s fine - single line spacing. What?s LiveCode adding to each line that causes Mac Mail to show the pasted text as double spaced? Is there a way to filter/remove that?
>> 
>> I don't have a good way to test this, but try:
>> 
>> set the clipboardData to textEncode(the clipboardData,"native")
>> 
>> 
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com <mailto:jacque at hyperactivesw.com>
>> HyperActive Software           |     http://www.hyperactivesw.com <http://www.hyperactivesw.com/>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list