Re: Illustrator CS4 hierarchical menus
Re: Illustrator CS4 hierarchical menus
- Subject: Re: Illustrator CS4 hierarchical menus
- From: "John C. Welch" <email@hidden>
- Date: Wed, 15 Sep 2010 13:19:16 -0400
- Thread-topic: Illustrator CS4 hierarchical menus
Title: Re: Illustrator CS4 hierarchical menus
On 9/15/10 12:12 PM, "John Welch" <email@hidden> wrote:
On 9/15/10 11:55 AM, "Simon Topliss" <email@hidden> wrote:
Alex,
On 15 Sep 2010, at 16:25, Alex Zavatone wrote:
It doesn't do what Object: Transform: Scale does.
Yes it does. You just need to know how.
What I need is what Object: Transform: Scale does.
Really, there's too much wrong to go on depth on it.
Why don't you start at the beginning and explain why your previous AS code to scale all page items doesn't work? Show us the code your tried and we'll help you fix it. It'll be much better than any GUI solution you hack together.
That’s why I’m confused. According to the dialog, Object -> Transform -> Scale gives me a limited set of options:
Scale uniform
Scale horizontal and vertical separately
Scale strokes and effects yes/no
Scale objects yes/no
Scale patterns yes/no
Preview
According to the command in the dictionary:
scale page item ¬
horizontal scale real ¬
vertical scale real ¬
transforming objects boolean ¬
transforming fill patterns boolean ¬
transforming fill gradients boolean ¬
transforming stroke patterns boolean ¬
line scale real ¬
about about
It actually looks to me at least, that the AppleScript version of scale gives you more options than the UI dialog box does.
So if there’s some huge deficiency, it’s not as obvious to others as it is to you, hence the request for more information.
After dinking with it, (seriously Alex, had you said this in plain english instead of being deliberately obtuse, it would have been a lot easier on people), the problem is with how Illustrator recalculates position of selected page items.
If you select all, then manually transform, it looks like illustrator calculates the centerpoint for the transform differently than if you do it via AppleScript.
If I had to guess, Illustrator is using the center of the objects via the GUI, instead of the bounding box for each object when you scale via AppleScript. So you get all kinds of weird positioning errors compared to the GUI.
Interestingly, if you set the selection of all page items to true, then a lot of parameters that are normally read-only, like geometric bounds, control bounds, visible bounds become read/write, so you could, theoretically, compensate for this, although I’ve forgotten enough math to not remember how. I don’t see this as being fixed in CS5 either, (I checked).
The closest I could get to “correct” was with this:
tell application "Adobe Illustrator"
set theDoc to current document
set selected of (every page item of theDoc) to true
scale selection horizontal scale 50.0 vertical scale 50.0 about document origin with transforming objects
end tell
And all that did was preserve relative object positioning, not window position. If someone here knows someone from the Illustrator team, or someone from that team is on the list, maybe they know of a way to handle this?
--
"Defensive programming? Never! Klingon programs are always on the offense. Yes, Offensive programming is what we do best."
_______________________________________________
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