Re: styled text to record, ok. But record to styled text?
Re: styled text to record, ok. But record to styled text?
- Subject: Re: styled text to record, ok. But record to styled text?
- From: Nigel Garvey <email@hidden>
- Date: Sat, 24 Jan 2004 13:47:13 +0000
Walter Ian Kaye wrote on Fri, 23 Jan 2004 17:47:33 -0800:
>
At 11:38p +0100 01/23/2004, Emmanuel didst inscribe upon an electronic
>
papyrus:
>
>
>At 8:57 PM +0000 23/01/04, Nigel Garvey wrote:
>
> >Is this any good?
>
> >
>
> > set a to "set fred to the clipboard"
>
> > set b to <<data
>
>
>
>styl000500000000000D000A00030100000AEFEF1F1F1D1D00000003000D000A00030000000
>
>
>
>A00000000000000000009000D000A00030100000AEFEF1F1F1D1D0000000B000D000A000300
>
> >00000A0000000000000000000C000D000A00030000000A2F2F8B8B2020>>
>
> >
>
> > set the clipboard to {<<class ktxt>>:a, <<class ksty>>:b}
>
> > the clipboard
>
>
It's interesting, but...
>
>
> >Usual warning about the chevrons.
>
>
>
>.... and about the size limit
>
>
...if there's a size limit, I can't use it. Because I don't know in
>
advance how long the styled text string might be.
Pity. When I was fooling around with it, I didn't encounter any size
limit with regard to actually using the clipboard in this way. There *is*
quite a low limit when trying to *compile* a <<class ksty>> data object
into a script, but I was assuming you already had your data and were just
trying to reintegrate it.
>
Christopher Stone sent me an email illustrating that a *list* would
>
work, although it requires special handling due to returning
>
{styledtext} upon reconversion (i.e., it becomes a 1-item list:
>
{text,styl} -> {stxt}). But since writing as list is special-cased
>
anyway, then un-listing afterwards just goes along with that.
>
Of course now I'm wondering which other seemingly-basic data types
>
would need similar special casing...
I couldn't make head nor tail of this, nor of any of the later replies,
until I went back to your original post. It appears it wasn't about
recombining text and styl at all, but about saving styled text to file
and retrieving it as such. The list approach is a nice one for this. It's
also good for when you don't know at the time of writing what sort of
data you'll be saving and retrieving
>
>(and usual grins for the hilarious error message associated).
>
>
>
>Emmanuel
>
>
Whassat?
Syntax error: "Way too long, dude."
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.