Re: How to make a new chart in AppleWorks 6?
Re: How to make a new chart in AppleWorks 6?
- Subject: Re: How to make a new chart in AppleWorks 6?
- From: Michelle Steiner <email@hidden>
- Date: Sun, 29 May 2005 12:38:05 -0700
On May 29, 2005, at 7:10 AM, kai wrote:
tell application "AppleWorks 6"
activate
tell (make new document with properties ¬
{document kind:spreadsheet document})
paste
set cellRange to object specifier of selection
make new chart display at end with properties ¬
{range:cellRange, chart kind:bar chart}
(* modify/add chart properties as required *)
end tell
end tell
Thanks, it works perfectly.
Here is the full script:
set the data_set to {}
set bday to "december 1, 1942"
set byr to year of date bday
set enlday to "march 9, 1961"
set enlyr to year of date enlday
set retday to "May 31, 1983"
set retyr to year of date retday
set thisyr to year of (current date)
repeat with loopyr from enlyr to thisyr
set age to loopyr - byr
if loopyr is less than retyr then
set time_in_svc to loopyr - enlyr
else
set time_in_svc to retyr - enlyr
end if
set percentage to time_in_svc / age
set percentage to (((percentage * 10000) as integer) / 100) as text
set data_set to data_set & {"\"" & (text -2 through -1 of ("0" &
(loopyr as text)) & "\"") & tab & percentage}
end repeat
set text item delimiters to return
set data_string to data_set as text
set text item delimiters to ""
set the clipboard to data_string
tell application "AppleWorks 6"
activate
tell (make new document with properties ¬
{document kind:spreadsheet document})
paste
set cellRange to object specifier of selection
make new chart display at end with properties ¬
{range:cellRange, chart kind:bar chart}
(* modify/add chart properties as required *)
end tell
end tell
It computes and graphs what percentage of my total adult life (being
defined as starting at the date I enlisted in the army) I spent in
the army for each year I was in the army.
-- Michelle
--
Social Security Privatization: a solution in search of a problem.
_______________________________________________
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