Re: Creating a chart or graphic line...
Re: Creating a chart or graphic line...
- Subject: Re: Creating a chart or graphic line...
- From: peter boardman <email@hidden>
- Date: Mon, 25 Oct 2004 09:24:18 +0100
Bernardo Hoehl <email@hidden> said on 2004-10-22, 13:26 (-0200 GMT):
> 1) How would you approach the problem? Use your own built app? Or use
> some exiting app?
>
> 2) Any tips of how to get it done?
Here's another suggestion for you. If you have developer tools installed, you'll find
the source code for an app called Sketch. This is an Apple-supplied example Xcode
project showing how to implement a basic drawing program in Cocoa. It's no
Illustrator (it only takes a second to launch, so it can't be :-)), but it's scriptable:
--
tell application "Sketch"
make new document
tell front document
repeat with i from 1 to 300 by 20
set xpos to round (random number) * i
set ypos to round (random number) * i
make new rectangle at end with properties {fill color:{0, 32000, 65535},
stroke thickness:0.2, stroke color:{0, 0, 0}, x position:xpos, y position:ypos,
width:5, height:5}
make new text area at beginning with properties {text contents:(xpos as
text) & "/" & ypos as text, stroke thickness:1.0, stroke color:{0, 0, 0}, x
position:xpos, y position:ypos, height:15.0, width:128.0}
end repeat
set font of text contents of every text area to "Optima Bold"
set size of text contents of every text area to 20
save in file (((path to desktop) as text) & "test.pdf")
end tell
end tell
--
You can also try stuff like this:
set stroke color of (graphics from rectangle 6 to rectangle 8) to {65535, 0, 65535}
set l to every graphic whose stroke color is {65535, 0, 65535}
and there's all that Objective C source code for you so you can make your own bug
fixes. :-)
Pete
_______________________________________________
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