Re: Getting Class of a Page Item in Illustrator CS 3
Re: Getting Class of a Page Item in Illustrator CS 3
- Subject: Re: Getting Class of a Page Item in Illustrator CS 3
- From: Shane Stanley <email@hidden>
- Date: Thu, 11 Jun 2009 09:27:54 +1000
- Thread-topic: Getting Class of a Page Item in Illustrator CS 3
On 11/6/09 4:23 AM, "Steven Valenti" <email@hidden> wrote:
> Can anyone explain why I'm getting...
> caPA for Path Item
> caGP for Group Item
> caCP for Compound Path Items
>
> ect.... when I ask for a class of a Page Item? It shows up in Script Debugger
> as fully spelled out.
When you save a compiled script, the values are saved not as strings but
using the various four-letter codes you are seeing. They only get converted
to strings when you open the script in a script editor, which does the
conversion using the app's dictionary. The dictionary is not loaded when you
run a compiled app, hence the strings aren't available.
So you need to do something like:
if itemClass is path item then
set itemClass to "path item"
...
--
Shane Stanley <email@hidden>
AppleScript Pro Sessions <http://scriptingmatters.com/aspro>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden