Re: AppleScript commands for AppleWorks Spreadsheets
Re: AppleScript commands for AppleWorks Spreadsheets
- Subject: Re: AppleScript commands for AppleWorks Spreadsheets
- From: T&B <email@hidden>
- Date: Sat, 1 Jun 2002 01:44:55 +1000
With a clean new AW Spreadsheet open I run the following Script
tell application "AppleWorks 6"
activate
select cell "A1" in spreadsheet of front document
copy to clipboard
select cell "B2" in spreadsheet of front document
paste values
end tell
B2 still ends up with the number and the formula. I thought 'values' or
'value' would act the same as Paste Special in the AW menu.
paste values should just paste the values. Clearly, it is a bug in
AppleWorks. I should add it to the list of AppleWorks scripting problems
at:
http://www.tandb.com.au/appleworks/problems/
I have never tried paste special before. But the good news is that you don'
t need to. Rather than use the macro approach of reproducing cell clicks
and menu commands, do it a scripting way:
tell application "AppleWorks 6"
get cell "A1" in spreadsheet of front document
set cell "B2" in spreadsheet of front document to result
end tell
or:
tell application "AppleWorks 6"
tell spreadsheet of front document
get cell "A1"
set cell "B2" to result
end tell
end tell
or:
tell application "AppleWorks 6"
tell spreadsheet of front document
set cell "B2" to cell "A1"
end tell
end tell
These don't require AppleWorks to be at the front and work much faster.
Tom
T&B
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.