• 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: Creating a chart or graphic line...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a chart or graphic line...


  • Subject: Re: Creating a chart or graphic line...
  • From: Bernardo Hoehl <email@hidden>
  • Date: Mon, 25 Oct 2004 10:32:50 -0200

Hi Peter,


I didn't know Sketch!

I built the app, and it looks real cool!

And don't have to pay for it. Can even change the app using the source code.

Thanks a lot for replying. Your post has been really very helpfull.

Bernardo



========================
On 25 Oct, 2004, at 6:24 AM, peter boardman wrote:

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:
email@hidden


This email sent to email@hidden


_______________________________________________ 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
References: 
 >Re: Creating a chart or graphic line... (From: peter boardman <email@hidden>)

  • Prev by Date: Native AS or grep via do shell script?
  • Next by Date: Re: email@hidden
  • Previous by thread: Re: Creating a chart or graphic line...
  • Next by thread: filemaker..
  • Index(es):
    • Date
    • Thread