• 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: Yosemite impact
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yosemite impact


  • Subject: Re: Yosemite impact
  • From: Yvan KOENIG <email@hidden>
  • Date: Sat, 04 Oct 2014 19:39:23 +0200


Le 04/10/2014 à 18:35, David Gregg <email@hidden> a écrit :

Not sure but maybe the following would help:

tell application “System Events” to tell process “Finder”
set frontmost to true

keystroke “f” using command down — note lower-case not upper-case
— or
click menu item “Find” of menu 1 of menu bar item “File” of menu bar 1

end tell

I am finding that since about Lion that the use of system events has required more attention to timing issues, i.e., longer delays or more attention to repeat loops that target specific elements arriving or disappearing. I also seem to require more frequent use of bringing the targeted app to the front.

David Gregg

It seems that you missed that my code started with : activate application "Finder" which put the Finder at front.

From my point of view,
click menu item “Find” of menu 1 of menu bar item “File” of menu bar 1

is inacceptable.
It's linked to a single language and it's easy to write a localization free code :

tell me to tell application "Finder" to set Find_loc to localized string "FF34"
activate application "Finder"
tell application "System Events" to tell process "Finder"
keystroke "F" using {command down} # broken in Yosemite developper preview
-- or
click menu item Find_loc of menu 1 of menu bar item 3 of menu bar 1
end tell

Yvan KOENIG (VALLAURIS, France) samedi 4 octobre 2014 19:38:57


 _______________________________________________
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: Yosemite impact (From: David Gregg <email@hidden>)

  • Prev by Date: Re: Setting Finder Column width
  • Next by Date: Re: Setting Finder Column width
  • Previous by thread: Re: Yosemite impact
  • Next by thread: Re: Yosemite impact
  • Index(es):
    • Date
    • Thread