• 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: Reveal the tables of a sheet in Numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reveal the tables of a sheet in Numbers


  • Subject: Re: Reveal the tables of a sheet in Numbers
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 25 Apr 2010 14:17:11 +0200


Le 25 avr. 2010 à 11:37, Axel Luttgens a écrit :


tell application "System Events"

tell application process "Numbers"

tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window dName

tell (first row whose value of static text 1 is sName and settable of attribute "AXDisclosing" is true)

set value of attribute "AXDisclosing" to true

end tell

end tell

end tell

end tell



Hello

I found a case when the script doesn't recognise a sheet row.
It's when the sheet doesn't contain tables. Such a sheet may contain text block, media items or nothing at all.
In such case, the property settable of the attribute AXDisclosing is false
Given that, for safe I will continue to identify sheet comparing size to the size of row 1 which is always a sheet one.

--=====

set s_Name to "main"
tell application "Numbers" to set d_Name to name of document 1
my selectSheet(d_Name, s_Name)

--=====

on selectSheet(dName, sName)
tell application "Numbers" to activate
tell application "System Events" to tell application process "Numbers" to tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window dName
set sheetSize to (get size of row 1)
tell (first row whose value of static text 1 is sName and size is sheetSize)
select it
if settable of its attribute "AXDisclosing" is true then set value of attribute "AXDisclosing" to true
end tell -- (first row
end tell -- System Events…
end selectSheet

--=====

Yvan KOENIG (VALLAURIS, France) dimanche 25 avril 2010 14:16:20


 _______________________________________________
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

  • Follow-Ups:
    • Re: Reveal the tables of a sheet in Numbers
      • From: Yvan KOENIG <email@hidden>
References: 
 >Reveal the tables of a sheet in Numbers (From: Yvan KOENIG <email@hidden>)
 >Re: Reveal the tables of a sheet in Numbers (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Reveal the tables of a sheet in Numbers
  • Next by Date: Re: Folder action when modifying a file
  • Previous by thread: Re: Reveal the tables of a sheet in Numbers
  • Next by thread: Re: Reveal the tables of a sheet in Numbers
  • Index(es):
    • Date
    • Thread