Problem with pasting from a Rev App to Pages..

stephen barncard stephenREVOLUTION2 at barncard.com
Sat May 5 19:40:23 EDT 2012


1. Continuing the discussion about the clipboard, I am offering to this
thread a test stack I created to satisfy my curiosity about the clipboard
contents array. This stack can be used to examine the copied data from any
application. It can examine without pasting if one uses the 'show keys'
button, and can display the results as text or hex data.

go URL "http://fulton.barncard.com/stax/clipboardTest27.rev"   (from the
message box)

Livecode seems to mainly get copied data in the clipboardData elements as


style      <---- this appears to be of most interest of those trying to get
formulas and complex data from word and excel
rtf      ]
unicode  ] <-- these look as expected
text     ]


some kind of image data will appear in an element named "image" if an image
is copied. Same with audio data. Copy a Livecode control and look at its
internal description as "object".  It's also interesting to see what other
apps put on the clipboard.

------------------------------------------------------------------------

*objects*

------------------------------------------------------------------------

0000  52 45 56 4F 32 37 30 30 00 00 06 92 01 00 00 08   REVO2700---+----

0010  00 00 00 00 00 08 63 6C 65 61 72 69 74 00 E8 65   ------clearit-+e

0020  8B 70 00 13 2D 2D 3E 20 61 6C 6C 20 68 61 6E 64   +p---->_all_hand

0030  6C 65 72 73 0A 0A 00 00 00 00 00 90 00 00 7B 00   lers••-----+--{-

0040  3F 00 22 00 17 00 00 00 00 00 12 63 6C 65 61 72   ?-"--------clear

This has not been tested on Windows.  I used RAWKEYDOWN and 'command key
down' to detect a paste, as "pastekey" does not work in the IDE. I'd like
to know if my key command workaround works on Win.

2.  Pasted contents may be manipulated after a paste to the invisible
'template field'  (or other invisible field) first. Then the contents could
be manipulated using the html and unicode commands.

On Thu, May 3, 2012 at 8:41 AM, Peter M. Brigham, MD <pmbrig at gmail.com>wrote:

> There used to be a clipboard utility for the Mac (somewhere back in the
> 10.5 days or thereabouts) that would allow you to manipulate the contents
> of the clip after copying, with a huge variety of options: text functions
> like changing case, font, size, unwrapping "hard" lines, etc., and IIRC
> also some image manipulation tools. It stopped working at some OS update or
> other, and AFAIK it died. I wish I could recall the name of it.
>
> Of course this is triply unhelpful to you, since the utility is probably
> defunct, only worked on Macs, and I think you want a totally background
> solution with no call for the user to do anything special. I mention it
> only because I found it so useful.
>
> -- Peter
>
> Peter M. Brigham
>
Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>



More information about the use-livecode mailing list