Re: Finder can't count?
Re: Finder can't count?
- Subject: Re: Finder can't count?
- From: Michelle Steiner <email@hidden>
- Date: Wed, 16 Feb 2011 10:58:29 -0700
On Feb 16, 2011, at 10:35 AM, Robert Poland wrote:
> The following script will only count the number of Folders in a Finder window regardless of what's visible or selected. Any ideas?.
>
> tell application "Finder"
> activate
> set wdw to window 1
> tell wdw
> tell application "System Events"
> keystroke "a" using command down -- select all
> end tell
> set itemsInWindow to count of items
> tell wdw to select {} -- deselect "All"
> end tell
> end tell
>
> try
> log itemsInWindow
> end try
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.
What are you actually trying to accomplish?
-- Michelle
--
Approximately 20% of workday absences occur on Tuesdays.
_______________________________________________
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