Anyone out there working with Illustrator?

I’ve done loads of scripting with InDesign and have found it wonderful to work with, but now I’m doing an Illustrator project, and it seems much less scriptable.

For example I can’t seem to find a way to get the height and width (or bounds) of a clipping mask rather than of the clipped photo that’s inside it.

Any suggestions will be appreciated.

rhb

Richard.

Here’s a quick little approach.

tell application "Adobe Illustrator"
	tell document 1
		set {{x, y, x2, y2}, w, h} to {geometric bounds, width, height} of (first path item of selection whose clipping is true)
		-- I used geometric bounds since a mask is generally unstroked
-- This is also an example of how I often will gather more data in one pass. I've gotten the coordinates, width, and height all in one pass instead of having to requery for each. Handy when you need it.
	end tell
end tell

Best Regards,
Jim Neumann
BLUEFROG