Adobe 65010248 Scripting Guide - Page 31

Paths and shapes, User-interaction levels, AppleScript

Page 31 highlights

CHAPTER 3: Scripting Illustrator Paths and shapes 31 Paths and shapes Paths are represented in the Illustrator DOM by the path item object. Path items include all artwork that contains paths, such as rectangles, ellipses, and polygons, as well as freeform paths. A freeform path consists of a series of path points. A path point can be specified in two ways: ➤ As an array of x and y page coordinates. ➤ As a path point object, which defines an anchor point and two direction points or handles that define the path segment's curve: For details, samples, and information on creating shapes, see the chapter for your scripting language. User-interaction levels When user feedback is required, an application typically presents a dialog. This is called user interaction. It is useful and expected when you are directly interacting with the application; however, when a script is interacting with an application, a dialog brings the execution of the script to a halt until the dialog is dismissed. This can be a serious problem in an automation environment, where there is no one present to deal with dialogs. The application object contains a user interaction level property that allows you to control the level of interaction allowed during script execution. You can suppress interaction in an automation environment or allow some interaction where scripts are being used in a more interactive fashion. AppleScript Using AppleScript, it is possible to send commands from one machine to another, so additional types of interaction are possible. In AppleScript:, there are four possible values for the user interaction level property: Property Value never interact interact with self interact with local interact with all Result No interaction is allowed. Interact only with scripts executed from the Scripts menu (File > Scripts). Interact with scripts executed on the local machine (including self ). Interact with all scripts.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57

C
HAPTER
3: Scripting Illustrator
Paths and shapes
31
Paths and shapes
Paths are represented in the Illustrator DOM by the
path
item
object. Path items include all artwork that
contains paths, such as rectangles, ellipses, and polygons, as well as freeform paths.
A freeform path consists of a series of path points. A path point can be specified in two ways:
As an array of x and y page coordinates.
As a
path
point
object, which defines an anchor point and two direction points or handles that define
the path segment’s curve:
For details, samples, and information on creating shapes, see the chapter for your scripting language.
User-interaction levels
When user feedback is required, an application typically presents a dialog. This is called
user interaction
. It
is useful and expected when you are directly interacting with the application; however, when a script is
interacting with an application, a dialog brings the execution of the script to a halt until the dialog is
dismissed. This can be a serious problem in an automation environment, where there is no one present to
deal with dialogs.
The
application
object contains a
user
interaction
level
property that allows you to control the level
of interaction allowed during script execution. You can suppress interaction in an automation
environment or allow some interaction where scripts are being used in a more interactive fashion.
AppleScript
Using AppleScript, it is possible to send commands from one machine to another, so additional types of
interaction are possible. In AppleScript:, there are four possible values for the
user
interaction
level
property:
Property Value
Result
never interact
No interaction is allowed.
interact with self
Interact only with scripts executed from the Scripts menu (File > Scripts).
interact with local
Interact with scripts executed on the local machine (including self).
interact with all
Interact with all scripts.