Re: How to Reference a Chart in an AppleWorks Spreadsheet
Re: How to Reference a Chart in an AppleWorks Spreadsheet
- Subject: Re: How to Reference a Chart in an AppleWorks Spreadsheet
- From: "Gary (Lists)" <email@hidden>
- Date: Wed, 18 May 2005 22:25:06 -0400
"Jonathan Levi, M.D." wrote:
> My spreadsheet has two charts; I'd like to get the x-axis title of
> the first one, as specified in AppleWorks.asdictionary. But I can't
> figure out how to refer to the chart in my script.
>
> Is this one of the "Unsupported scripting features" meant by the
> AppleScript Usage Notes when it says, "The following areas of
> AppleWorks 6.0 are not fully scriptable:...Spreadsheet Charts."?
Hi Jonathan.
Well, I don't know either but...
I was able to work backwards from a document selection (of a bar chart) and
get to at least this:
=====================
tell document 1 to tell graphic object 1 of drawing area to its properties
--> {class:graphic object, index:1, bounds:{181.0, 107.0, 541.0, 331.0},
fill color:{65535, 65535, 65535}, fill pattern:2, fill gradient:off, fill
texture:off, name:"", pen color:{0, 0, 0}, pen pattern:2, pen width:1.0,
rotation:0, text wrap:no wrap, wrap gutter:5, lock:read write, graphic
object:{class:chart frame, index:1}}
=====================
which seemed to lead me in the right direction, so I explored...
=====================
tell document 1
tell graphic object 1 of drawing area
set c to chart frame 1
end tell
end tell
--> chart frame 1 of drawing area of document "Levi.cwk"
tell c to its properties
--> {class:chart frame, index:1, bounds:{181.0, 107.0, 541.0, 331.0}, fill
color:{65535, 65535, 65535}, fill pattern:2, fill gradient:off, fill
texture:off, name:"", pen color:{0, 0, 0}, pen pattern:2, pen width:1.0,
rotation:0, text wrap:no wrap, wrap gutter:5, lock:read write}
=====================
The dictionary says that 'chart frame' should have a 'chart' property, but I
don't see it in that result.
=====================
tell document 1 to tell graphic object 1 of drawing area to its charts
--> {graphic object 1 of drawing area of document "Levi.cwk"}
=====================
Back full-circle, mostly.
Either its 'unsupported' ... or I am.
--
Gary
PS -- tested in AppleWorks 6.2.9 X
_______________________________________________
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