|
|
|
|
#1 |
|
Member
Join Date: Jan 2005
Posts: 103
|
When you're scripting something and you can't seem to get it to work, you can often sort things out by examining how the UI handles the kinds of things you're working with.
But this can also mislead you. The UI is not the object model. It is a front-end that is designed to make life easier for the interactive user. So, sometimes the UI does things because it is a program and not because the underlying object model works that way. The most frequently encountered example of this comes up when working with strokes from a script. The UI links the color and weight, set one and you get the default setting for the other. But this does not happen automaticall when a script sets these properties. When setting strokes from a script, you must set both the weight and the color. Just set the weight and you'll get an invisible stroke. Similarly, just set the color (swatch), and you'll still have a zero weight but now colored stroke which can result in a hairline on press because some (most?) RIPs impose a minimum weight for colored strokes. By the way, this tip is scripting language independent. Dave |
|
|
|
|
|
#2 | |
|
Sysop
Join Date: Oct 2004
Location: Subtropical Queensland, Australia, between the mountains and the Coral Sea
Posts: 3,977
|
Quote:
__________________
|
|
|
|
|
|
|
#3 | |
|
Staff
Join Date: Oct 2004
Location: Melbourne, Australia
Posts: 526
|
Quote:
I always think of scripting as an alternative interface. This is actually easier to do in some applications than others -- it's a lot harder to do in something like InDesign, where the scripting implementation closely follows the UI (for largely technical reasons), than in apps like Illustrator or even QuarkXPress, where the two are less closely coupled. I prefer the latter approach, although it makes it harder for new users and it's a lot harder to implement, if not impractical, and very complex apps. But it does encourage the hallmark of good interface design: consistency across applications. Shane |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|