Re: Detecting if text is styled
Re: Detecting if text is styled
- Subject: Re: Detecting if text is styled
- From: ehsan saffari <email@hidden>
- Date: Fri, 29 Nov 2002 08:12:10 -0600
On 29/11/2002 00:00, Kai Edwards <email@hidden> wrote:
>
Neat use of the error message, ehsan!
not my invention! (maybe R22's?).. something I picked up on this list
>
If you're interested, here's a variation[1] which might work[2] a bit
>
faster[3]:
>
>
=================
>
>
on isPlainText(v)
>
({{p:v}} as string)'s text -8 thru -5 = "styl"
>
end isPlainText
>
>
=================
>
>
Kai
>
>
-----------------
>
>
[1] Borrowing from Arthur's hack
>
[2] Again, for FMP only
>
[3] OMM, about 3-5 times quicker
It is certainly better than my approach since it doesn't choke on large
styled text chunks
if m = "<<data styl>>" then
--> Can't perform operation on text longer than 32K bytes. (-2721)
Thanks to Arthur & Kai
cheers
ehsan
_______________________________________________
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.