Re: Numbers '08 (Selection range)
Re: Numbers '08 (Selection range)
- Subject: Re: Numbers '08 (Selection range)
- From: KOENIG Yvan <email@hidden>
- Date: Tue, 13 Jan 2009 12:51:11 +0100
tell application "Numbers"
tell document 1
set mySelectedRanges to selection range of every table of every
sheet whose it is not missing value
repeat with sheetRanges in mySelectedRanges
try
count of sheetRanges
on error
set sheetRanges to {sheetRanges}
end try
repeat with thisRange in sheetRanges
if contents of thisRange is not missing value then
try
--return thisRange --poorly formed result
thisRange as text
on error errMsg number errNum
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"\""}
set {_, myRange, _, myTable, _, mySheet, _, myDoc} to text
items of errMsg
set mySelection to (a reference to (range myRange of table
myTable of sheet mySheet))
set AppleScript's text item delimiters to oldDelims
return {myRange, myTable, mySheet, myDoc, mySelection}
end try
end if
end repeat
end repeat
end tell
end tell
Now it works even if a sheet contains only one table.
Yvan KOENIG (from FRANCE mardi 13 janvier 2009 12:50:52)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden