• 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: Finder can't count?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder can't count?


  • Subject: Re: Finder can't count?
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 16 Feb 2011 12:25:11 -0700

On Feb 16, 2011, at 11:55 AM, Robert Poland wrote:

>> What is the problem?  The script tells the Finder to count all the items in the window, and that's what it does.  Selecting or deselecting is irrelevant to the rest of the script.
>
> In my test window I have 2 folders, one of which is open displaying 10 files.
>
> I want to get a count of all 12 visible items.
>
> Either my explanation was bad or my system is broken.


I can't figure out how, programmatically, to select everything in the window, but once you can, the following will give you the count you need.

tell application "Finder"
	count of (the selection as list)
end tell

-- Michelle

--
"Experience is that marvelous thing that enables you to recognize a mistake when you make it again."  --F. P. JONES



 _______________________________________________
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: 
 >Finder can't count? (From: Robert Poland <email@hidden>)
 >Re: Finder can't count? (From: Michelle Steiner <email@hidden>)
 >Re: Finder can't count? (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Finder can't count?
  • Next by Date: Re: Finder can't count?
  • Previous by thread: Re: Finder can't count?
  • Next by thread: Re: Finder can't count?
  • Index(es):
    • Date
    • Thread