• 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: disclosure triangle detection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disclosure triangle detection


  • Subject: Re: disclosure triangle detection
  • From: Nigel Garvey <email@hidden>
  • Date: Mon, 20 Jun 2011 21:21:12 +0100

I wrote on Mon, 20 Jun 2011 20:57:22 +0100:

>Jim Brandt wrote on Mon, 20 Jun 2011 10:29:38 -0500:

>>I want to write a script that sets the bounds of the window based on
>>the number of items being shown in the list view.

>Like Robert's script, this counts the visible items in a Finder window,
>but does so without selecting anything. Tested in both 10.4.11 and
>10.6.7 with all permutations of toolbar and sidebar visibiltiy:
>
>  -- Assuming the Finder's front window is a Finder window in list view.
>  tell application "System Events"
>    tell application process "Finder"
>      tell window 1
>        -- Splitter group test for when the toolbar hidden in OS
10.4.11.
>        if (splitter group 1 exists) then
>          count rows of outline 1 of scroll area -1 of splitter group 1
>        else
>          count rows of outline 1 of scroll area -1
>        end if
>      end tell
>    end tell
>  end tell

I suppose another possibility would be to read the number of items off
the status bar.  :)

  -- Assuming the Finder's front window is a Finder window in list view.
  tell application "System Events"
    tell application process "Finder"
      tell window 1
        -- Group 1 test for 10.4.11.
        if (group 1 exists) then
          name of static text 1 of group 1
        else
          name of static text 1
        end if
        (word 1 of result) as integer
      end tell
    end tell
  end tell


NG

 _______________________________________________
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: disclosure triangle detection
      • From: Nigel Garvey <email@hidden>
  • Prev by Date: Re: address book entries by date created
  • Next by Date: Re: disclosure triangle detection
  • Previous by thread: Re: disclosure triangle detection
  • Next by thread: Re: disclosure triangle detection
  • Index(es):
    • Date
    • Thread