• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Creating objects with AS in Illustrator 10
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating objects with AS in Illustrator 10


  • Subject: Creating objects with AS in Illustrator 10
  • From: Emile Schwarz <email@hidden>
  • Date: Wed, 18 Jan 2006 13:06:03 +0100

Hi all,


The only objects I can create using AppleScript in Adobe Illustrator 10 are in the Shape Creation Suite (Adobe Illustrator 10 dictionary): ellipse, polygon, rectangle, rounded rectangle and star.



I want to create line (draw a line from x,y to x1,y1) and access all other objects available in Adobe Illustrator 10.



Is it possible ? If the answer is Yes, how ? [and where can I get that information if it is too large to put it there?]



TIA,

Emile



Here is a simple AppleScript that create these five objects, resize and move them at the top of the page:

tell application "Adobe Illustrator 10"
-- set the default width and height
set w to 100
set h to 100

-- create a 'default' ellipse
set ellipse1 to make new ellipse at document 1
set width of ellipse1 to w
set height of ellipse1 to w
set position of ellipse1 to {10, 830}

-- create a 'default' polygon
set polygon1 to make new polygon at document 1
set width of polygon1 to w
set height of polygon1 to w
set position of polygon1 to {120, 830}

-- create a 'default' rectangle
set Rectangle1 to make new rectangle at document 1
set width of Rectangle1 to w
set height of Rectangle1 to w
set position of Rectangle1 to {230, 830}

-- create a 'default' rounded rectangle
set RoundRectangle1 to make new rounded rectangle at document 1
set width of RoundRectangle1 to w
set height of RoundRectangle1 to w
set position of RoundRectangle1 to {340, 830}

-- create a 'default' Star
set Star1 to make new star at document 1
set width of Star1 to w
set height of Star1 to w
set position of Star1 to {450, 830}

return {properties of ellipse1, return, return, properties of polygon1, return, return, properties of Rectangle1, return, return, properties of RoundRectangle1, return, return, properties of Star1}
end tell


Of course, we are able to change other properties (Frame [stroke] and Fill colors for example)...


PS: the y = '0' position is at the bottom of the page, so I used 830 which is the height of my document.
I think/recall that this is the PostScript way.




BTW: AppleWorks is far away from Illustrator (not comparable at all), but there is much more objects that can be created in the Graphics Suite...

For example:

<quote>
Class line:
Plural form:
lines
Properties:
start point point -- the starting point of the line
end point point -- the ending point of the line
arrow style no arrow/arrow at start/arrow at end/arrow at both ends -- the arrow style
<Inheritance> graphic object [r/o] -- subclass of graphic object
</quote>


Isn't it nice ?


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Creating objects with AS in Illustrator 10
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Scripting Internet Connection
  • Next by Date: Problem with tell application "Finder" get exists...
  • Previous by thread: Re: NDN: Re: Finder scripting bug
  • Next by thread: Re: Creating objects with AS in Illustrator 10
  • Index(es):
    • Date
    • Thread