• 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
Re: Adobe Illustrator 9.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adobe Illustrator 9.0


  • Subject: Re: Adobe Illustrator 9.0
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 21 Nov 2000 08:41:34 +1100

On 21/11/00 8:22 AM +1000, Jim Bob Support, email@hidden, wrote:

> anyone scripting Adobe Illustrator yet ?
>
> i'm just getting started, looks like there is an amazing opportunity hiding
> there...
>
> any help or examples that you might be able to forward me would be greatly
> appreciated.

If you go to <http://macscripter.net/graphics.html>, there's a script of
mine called Humble Pie that shows how to script pie charts (as "raw"
graphics).

You might also like to play with this, email systems permitting:

tell application "Adobe Illustrator. 9.0"
make new document at beginning with properties {color space:CMYK}
tell document 1
set properties of view 1 to {screen mode:full screen, zoom:1, center
point:{0, 0}}
activate
set windowBounds to bounds of view 1
set theRadius to ((item 2 of windowBounds) - (item 4 of windowBounds)) *
0.45
set innerRadius to theRadius * 0.9
set weigthFactor to theRadius / 100
make new ellipse at beginning with properties {bounds:{-theRadius,
theRadius, theRadius, -theRadius}}
set properties of path item 1 to {stroke width:weigthFactor, filled:true,
opacity:100.0, stroke color:{class:CMYK color info, cyan:0.0, magenta:0.0,
yellow:0.0, black:100.0}, fill color:{class:CMYK color info, cyan:0.0,
magenta:0.0, yellow:20.0, black:0.0}, stroke dashes:{}, stroked:true}

repeat with anEndSet in {{{0, innerRadius}, {0, theRadius}}, {{0,
-innerRadius}, {0, -theRadius}}, {{innerRadius, 0}, {theRadius, 0}},
{{-innerRadius, 0}, {-theRadius, 0}}}
make new path item at beginning with properties {entire path:anEndSet,
stroke width:4 * weigthFactor, filled:false, opacity:100.0, stroke
cap:butted, stroke color:{class:CMYK color info, cyan:0.0, magenta:0.0,
yellow:0.0, black:100.0}, stroke dashes:{}, stroked:true}
end repeat

repeat with i in {1, 2, 4, 5, 7, 8, 10, 11}
make new path item at beginning with properties {entire path:{{0,
innerRadius}, {0, theRadius}}, stroke width:weigthFactor, filled:false,
opacity:100.0, stroke cap:butted, stroke color:{class:CMYK color info,
cyan:0.0, magenta:0.0, yellow:0.0, black:100.0}, stroke dashes:{},
stroked:true}
rotate path item 1 angle -i * 30 about document origin
end repeat

make new path item at beginning with properties {entire path:{{0, 0}, {0,
theRadius * 0.7}}, stroke width:3.5 * weigthFactor, name:"Hour",
filled:false, opacity:100.0, stroke cap:projecting, stroke color:{class:CMYK
color info, cyan:0.0, magenta:0.0, yellow:0.0, black:100.0}, stroke
dashes:{}, stroked:true}
make new path item at beginning with properties {entire path:{{0, 0}, {0,
innerRadius}}, stroke width:2.5 * weigthFactor, name:"Minute", filled:false,
opacity:100.0, stroke cap:projecting, stroke color:{class:CMYK color info,
cyan:0.0, magenta:100.0, yellow:100.0, black:0.0}, stroke dashes:{},
stroked:true}
make new path item at beginning with properties {entire path:{{0, 0}, {0,
theRadius}}, stroke width:weigthFactor, name:"Second", filled:false,
opacity:100.0, stroke cap:projecting, stroke color:{class:CMYK color info,
cyan:100.0, magenta:0.0, yellow:0.0, black:30.0}, stroke dashes:{},
stroked:true}

make new ellipse at beginning with properties {bounds:{-5 * weigthFactor,
5 * weigthFactor, 5 * weigthFactor, -5 * weigthFactor}}
set properties of path item 1 to {stroke width:0, filled:true,
opacity:100.0, fill color:{class:CMYK color info, cyan:100.0, magenta:0.0,
yellow:0.0, black:30.0}, stroked:false}

set theTime to current date
set theSecs to time of theTime
set theMins to (theSecs mod (60 * 60)) div 60
set theHours to theSecs div (60 * 60)
set theSecs to theSecs mod 60
rotate path item "Second" angle -theSecs * 6 about document origin
rotate path item "Minute" angle -theMins * 6 - theSecs / 10 about document
origin
rotate path item "Hour" angle -theHours * 30 - theMins / 2 about document
origin
repeat
repeat while (current date) - theTime < 1
end repeat
rotate path item "Second" angle -6 about document origin
rotate path item "Minute" angle -0.1 about document origin
rotate path item "Hour" angle -0.01 / 6 about document origin
redraw
set theTime to theTime + 1
end repeat
end tell
end tell

Enjoy...

--
Shane Stanley, email@hidden


References: 
 >re: Adobe Illustrator 9.0 (From: "Jim Bob Support" <email@hidden>)

  • Prev by Date: re: Adobe Illustrator 9.0
  • Next by Date: move the contents of a document into a variable/record...
  • Previous by thread: re: Adobe Illustrator 9.0
  • Next by thread: move the contents of a document into a variable/record...
  • Index(es):
    • Date
    • Thread