Pasting text and images together?

Paul Dupuis paul at researchware.com
Sat Sep 2 11:13:08 EDT 2023


Since my method didn't work, I'd try Marks, namely to put the keys of 
the clipboard array into a variable to look at

on mouseUp
   lock clipboard
   put the keys of the clipboarddata into tKeys1
   put the keys of the fullclipboarddata into tKeys2
   put the keys of the rawclipboarddata into tkeys3
   breakpoint
   unlock clipboard
end mouseUp

I tested this in LC 10dp6 and it works. Once you see what keys are 
present with your mixed text and images copied to the clipboard, you can 
choose which clipboard array and keys to work with to get the data.

-- Paul


On 9/2/2023 10:36 AM, David Epstein via use-livecode wrote:
> Many thanks to Paul Dupuis and Mark Waddingham.  The script below tries to
> test their suggestions.  Using 10.0.0 dp5 on an Intel Mac, and watching
> execution after the breakpoint, I get errors at each "try" in the script.
> So it does not seem that I can write the fullClipboardData
> or rawClipboardData to an array variable; and it does not seem that I can
> access any element of the rawClipboardData array.  Further advice is
> welcome.
>
> Best wishes,
> David Epstein
>
> *on* a2
>
> *lock* clipboard
>
> *put* the keys of the clipboardData into myK1
>
> *put* the keys of the fullClipboardData into myK2
>
> *put* the keys of the rawClipboardData into myK3
>
> *breakpoint*
>
> *try*
>
> *put* the fullClipboardData into ta2
>
> *catch* myError
>
> *put* myError into e2
>
> *end* *try*
>
> *try*
>
> *put* the rawClipboardData into ta3
>
> *catch* myError
>
> *put* myError into e3
>
> *end* *try*
>
> *put* 1 into n
>
> *repeat* for each line k in myK3
>
> *try*
>
> *put* the rawClipboardData[k] into temp[n]
>
> *catch* myError
>
> *put* myError into e4[n]
>
> *end* *try*
>
> *add* 1 to n
>
> *end* *repeat*
>
> *unlock* clipboard
>
> *end* a2
> _______________________________________________
> 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