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: Thu, 28 Nov 2002 03:02:59 -0600
Ok let me try this again...first my inteneded use for detecting styled
text has nothing to do with the clipboard, and Jon's command's clipboard,
and it's equivalent in Standard additions seems to throw in data that
skews the results.
What I am doing is getting text from FilemakerPro (as styled text) and
then testing to see if it is really styled or not. here is how...
In a db i have two fields [PText (plain) and Stext (Styled)] PText
contains a "Z" with no styles, Stext contains a "Z" in Red.
Now I run this script in SD, with the EventLog open in AE Print Mode:
("<<" is option-\ and ">>" is option-Shift-\)
tell application "FileMaker Pro"
set p to cell "PText" as styled text
--> STXT{ktxt:"Z", ksty:'styl'()}
set s to cell "SText" as styled text
--> STXT{ktxt:"Z",
ksty:styl(<<000100000000000E000A00150000000CDDDD00000000>>)}
end tell
set pp to (p as record)'s <<class ksty>>
--> <<data styl>>
set ss to (s as record)'s <<class ksty>>
--> <<data styl000100000000000E000A00150000000CDDDD00000000>>
so the problem boils down to this: how to detect whether <<class ksty>>
is exactly
<<data styl>> or <<data stylbinary>>
Thanks for any help
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.