• 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: Numbers '08 (Selection range)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Numbers '08 (Selection range)


  • Subject: Re: Numbers '08 (Selection range)
  • From: "Stockly, Ed" <email@hidden>
  • Date: Mon, 12 Jan 2009 18:57:16 -0800
  • Thread-topic: Numbers '08 (Selection range)

This version does the same thing, and may be a bit faster, but is still
pretty ugly.

Also OMM the selection range returns a gnarly looking result:

 «class» "L21:M31" of table "Table 1" of sheet "11 NET STD" of document
"Bcast_Prime_Avgs_122208" of application "Numbers"

But this version returns an actual range that may be more useful.

range "L21:M31" of table "Table 1" of sheet "11 NET STD Live+SD" of document
1 of application "Numbers"

HTH,

ES

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 thisRange in mySelectedRanges
      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 to text item 2 of errMsg
          set myTable to text item 4 of errMsg
          set mySheet to text item 6 of errMsg
          set myDoc to text item 8 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 mySelection
        end try
      end if
    end repeat
  end tell
end tell

>> This isn't pretty, but it's less complicated, and faster than GUI scripting.
>
> tell application "Numbers"
> tell document 1
> repeat with s in every sheet
> tell s
> repeat with t in every table
> tell t
> if selection range exists then
> return selection range
> -- or do something useful


 _______________________________________________
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

  • Prev by Date: Re: Where to log lines go
  • Next by Date: Re: Numbers '08 (Selection range)
  • Previous by thread: Is there a way to delete original desktop folders with hard links to server folders?
  • Next by thread: Re: Numbers '08 (Selection range)
  • Index(es):
    • Date
    • Thread