• 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: Why is all not all?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is all not all?


  • Subject: Re: Why is all not all?
  • From: Robert Poland <email@hidden>
  • Date: Sun, 03 Apr 2011 09:45:49 -0600

On Apr 3, 2011, at 9:15 AM, Nigel Garvey wrote:

> 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

NG,

Using Finder instead of System Events gives the same results.

The shortcut that calls this action is control-option-command-M.

Previously I used "keystroke "a" using command down" but found that was interfered with by the option-control keys.

The cure, for now, is a delay to allow the shortcut keys to be released.

Of course that screws up a fast command.


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: Why is all not all? (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Getting a subset list of files
  • Next by Date: Re: Getting a subset list of files
  • Previous by thread: Re: Why is all not all?
  • Next by thread: Getting rid of web page warning - Opening .html pages stored on drive -
  • Index(es):
    • Date
    • Thread