• 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: Robert Poland <email@hidden>
  • Date: Tue, 21 Jun 2011 10:52:34 -0600

NG,

That fails on some empty folder windows that have only three words like "753.03 GB available"

So I added;
try
set countOfItemsInWindow to (word -5 of result) as integer
on error
set countOfItemsInWindow to 0 -- empty window
end try

On Jun 21, 2011, at 8:56 AM, Nigel Garvey wrote:

Robert Poland wrote on Mon, 20 Jun 2011 15:34:59 -0600:

[Re: reading the number of items displayed in a list view Finder window
from the status bar, when the status message is different if items are
selected.]

NG,

Here's my cure for that issue;

tell application "Finder"
select {} -- deselect choice(s)
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
end tell

Mine would be to change 'word 1' to 'word -5'.  ;)

But I still prefer my earlier script, which counts the display rows and
is therefore message-independent.

NG

Robert Poland - Fort Collins, CO



 _______________________________________________
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

References: 
 >Re: disclosure triangle detection (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Excel Sheets to CSV
  • Next by Date: width of column id name column
  • Previous by thread: Re: disclosure triangle detection
  • Next by thread: adding target to Xcode 4
  • Index(es):
    • Date
    • Thread