Re: Why is all not all?
Re: Why is all not all?
- Subject: Re: Why is all not all?
- From: Nigel Garvey <email@hidden>
- Date: Sun, 03 Apr 2011 16:15:49 +0100
Robert Poland wrote on Sun, 03 Apr 2011 07:11:19 -0600:
>On Apr 3, 2011, at 12:02 AM, Michelle Steiner wrote:
>
>> On Apr 2, 2011, at 8:42 PM, Robert Poland wrote:
>>
>>> List view. Some folders open and showing files.
>>>
>>> When I run a script with the following in it the "select All" selects
>only folders and not the other items showing. If I do a "Select All" from
>the finder Edit drop down menu, all items are selected.
>>>
>>> tell application "Finder"
>>> if ((current view of window index 1) = list view) then
>>> set {newL, newT, newR, newB} to bounds of window of desktop -- get
>screen size for monitor
>>> set wdw to Finder window 1
>>>
>>> tell application "System Events"
>>> select every item in wdw -- select all
>>> end tell
>>
>> Because they're not in that folder; they're in sub folders.
>
>What folder, the command is referring go the window.
Hi, Robert.
1. Finder windows don't have elements. Any items you get from them
belong to their targets.
2. System Events shouldn't be asked to handle Finder references.
Assuming the Finder's front window is a 'Finder window', you can select
everything in it like this:
tell application "System Events"
set frontmost of application process "Finder" to true
keystroke "a" using command down
end tell
-- Delay here?
tell application "Finder" to get selection
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