Re: use-livecode Digest, Vol 172, Issue 22

2018-01-16 Thread Mark Waddingham via use-livecode
On 2018-01-11 20:50, Richard Gaskin via use-livecode wrote: Richard Burkett wrote: Nice, but not as nice as: copy I appreciate that we have the flexibility to do arcane things with the Clipboard when needed, but shouldn't the copy command handle the most common cases without requiring new use

Re: use-livecode Digest, Vol 172, Issue 22

2018-01-16 Thread Mark Waddingham via use-livecode
On 2018-01-16 05:13, Brian Milby via use-livecode wrote: The code for MacOS is simpler (the 2 put's following the itemdel are not needed, the format name is "public.html", not sure about Linux). I copied the above code in LC and then clicked the button to fix it before pasting here. Changing

Re: use-livecode Digest, Vol 172, Issue 22

2018-01-15 Thread Brian Milby via use-livecode
Here is a function for Windows that will replace with and include " " for multiple spaces. It retains the other formatting. (It won't catch paragraph level formatting as is though.) So if you are copying code, this could be used to clean it for paste as rich text: *on* mouseUp *local* tFor

Re: use-livecode Digest, Vol 172, Issue 22

2018-01-11 Thread Brian Milby via use-livecode
The problem in this case is the HTML format data (and possibly RTF) on the clipboard. Testing in Windows, if I just put the LC styled text and plain text on the clipboard, it works to get plain text outside of LC but retain formatting inside. If I try to paste the RTF or LC data into Excel, I just

Re: use-livecode Digest, Vol 172, Issue 22

2018-01-11 Thread Richard Gaskin via use-livecode
Richard Burkett wrote: > on mouseUp >put fld "myField" into tClip >lock the clipBoard >set the ClipboardData to empty >set the ClipboardData to tClip >put the clipboardData["text"] into tClip >set the rawclipBoardData to empty >if the platform is "MacOS" then > s

Re: use-livecode Digest, Vol 172, Issue 22

2018-01-10 Thread Brian Milby via use-livecode
You may be able to simplify it to this: *on* stripClipboard *local* tData *lock* the clipboard *put* the rawClipboardData["public.utf8-plain-text"] into tData *set* the rawClipboardData to empty *set* the rawClipboardData["public.utf8-plain-text"] to tData *unlock* the clipboard *end* strip

Re: use-livecode Digest, Vol 172, Issue 22

2018-01-10 Thread Richard Burkett via use-livecode
Thank you, Paul! I finally got this to work in my test stack using the script below. Note that it has the change to “set the rawClipBoardData to empty” instead of just “set the ClipBoardData to empty” - that seemed to be necessary at least in LC 8.1.3 with Mac OS X 10.12.8 Sierra which I have to