> ...and there are things that can be done in scripts that can't be done in the UI.
I'd consider that a matter of course. Otherwise, scripting would be little more than a mere macro recorder/playback feature (which Illustrator has in its Actions feature).
It's those scripting things that can't be done in the UI that interest me most in a drawing program. Examples:
-Call for an ellipse aspect ratio in terms of a single "angle" value (with which anyone who has ever used drafting templates is familiar), instead of by the tedious height and width dimensions.
-Randomly distribute instances of one object within the bounds of another.
-Programmatically draw faux "fractal" constructs like tree branching or lightning.
-Create a set of sequentially-numbered textframe objects (as for callouts in a technical drawing).
-Create a tedious geometric construct like a wireframe "sphere" with user-defined numbers of latitude/longitude lines, and at any user-defined tilt angle. (The potential for other similar constructs via scripting is no doubt huge, and has yet to be explored.)
And so on.
In fact, in a drawing program, I would much prefer the scripting model development to enable things that can't be done in the UI than focus on mere automated playback of UI features. For example, a "collision detection" or "overlap" function could be employed for many useful scripted possibilities, if pathItems had some kind of "region" property that would let you distinguish "inside" from "outside" a path.
> It's not quite true to say that you can script anything in the UI in InDesign, but it's darn close...
It would be darn close in AI, too, if but for two things:
First, AI's bug which has, for at least three versions now, prevented Actions from calling scripts. It can be done for the duration of a worksession, but the Action (macro) "forgets" which script is to be called between launches of the program.
Second, the missing script method to launch an Action, and then return to the script.
Fix the first and add the second, and one would also be able to say that AI's scripting is darn close to being able to do whatever the UI can, too....
...with the exception of a few things that I suspect have more to do with the (goofy) way that AI is built; some foundational things in AI are archaic throwbacks for which competing programs found better treatments decades ago. (I say 'I suspect' because I am only a rank beginner of a programmer; corrections from anyone who actually knows better are quite welcome.) Examples:
Illustrator still doesn't provide user-defined ruler scales. It seems arcaically married to its underlying 1/72" grid, and
everything in the program is tyrannically referenced to that.
Certain fundamental things that should be document-specific are instead stashed away in preferences. SmartGuides settings, for example, should
clearly be document-specific, not app-level, settings. I've long suspected that kind of thing might be related to the scripting model's inability to change some "document specific" things like Artboard size and ruler units.
Certain "features" of Illustrator appear to be actually implemented as clumsy workarounds or "cheats", as opposed to proper and straightforward programming. I wonder if that's what gives rise to some seemingly bizarre aspects of the scripting model, like its apparent confusion between Global Swatches (a poorly-conceived and poorly-executed aspect of AI in itself) and Spot Colors.
I also take the continued ommission of certain downright
embarassingly absent bread & butter features long commonplace in any decent drawing program as root causes of limitations of the scripting model. For example, it should be suspected by any experienced vector illustrator who is even moderately observant that there must be something seriously awry in AI's underpinnings to explain its
still not including a straightforward, no-nonsense path-cutting/shape-trimming functionality that properly handles strokes and fills of the same path(s).
So I could be wrong, but I suspect some of the apparent "incompleteness" of AI's scripting model may have more to do with AI's archaic underpinnings.
JET
... View more