EDOBE XDOM TPC Technical Information Page 27

  • Download
  • Add to my manuals
  • Print
  • Page
    / 68
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 26
CHAPTER 3: Scripting Illustrator Working with objects 27
X
Use the New operator if you added a reference to the Illustrator type library to the project. For example,
the following line creates a new reference to the
Application object:
Set appRef = New Illustrator.Application
Quitting Illustrator
AppleScript
Use the quit command:
tell application "Adobe Illustrator"
quit
end tell
JavaScript
Use the app.quit() method:
app.quit()
VBScript
Use the Application object’s Quit method:
Set appRef = CreateObject("Illustrator.Application")
appRef.Quit
Working with objects
Getting the frontmost document or layer
To refer to the selected document, use the application objects current document property in
AppleScript or the
active document property in JavaScript or VBScript. Similarly, you can use the
document object’s current layer or active layer property to refer to the selected layer.
There are other types of “active” or “current” object properties, like
active dataset or active view. For
details, see the Adobe Illustrator CS5 Scripting Reference for your language.
Creating new objects
Several objects (besides the application object itself) cannot be obtained from containers or parent
objects. Your script must create these objects directly.
Page view 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 67 68

Comments to this Manuals

No comments