• 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: System Events scripting of Finder window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events scripting of Finder window


  • Subject: Re: System Events scripting of Finder window
  • From: Doug McNutt <email@hidden>
  • Date: Sat, 17 Mar 2007 19:14:41 -0600

Thanks guys. I doubt that AppleScript would continue to exist without this list.

--This, from deivy petrescu, works providing that directory Transfer is the top Finder window at execution
His comment: "Without accessibility Inspector, it is murder to script SE." is well taken.

tell application "System Events"
	set frontmost of application "Finder" to true
	tell process "Finder"
		click menu item 1 of menu 5 of menu bar 1
		delay 1
		click of menu item 2 of menu 1 of menu item 7 of menu 5 of menu bar 1
	end tell
end tell


-- This, from  kai, also works. His names were different from mine probably because I'm stuck at 10.3.9.  It's interesting to note that "Arrange" is either menu item 5 or 6 depending on starting at 0 or 1 for the count from the top of the GUI pull down menu. I see no way it can be 7, but it does work that way in the script above. I believe the AXRaise and frontmost commands are equivalent.

tell application "Finder"
	activate
end tell
tell application "System Events"
	tell application process "Finder"
		perform action "AXRaise" of window "Transfer"
		click menu item "by Date Modified" of menu 1 of menu item "Arrange" of menu 1 of menu bar item "View" of menu bar 1
	end tell
end tell


At 08:25 -0400 3/17/07, David Marshall wrote:
>Try calling it menu bar 1.
Well taken.  It shows as menu bar "" in the examiner.  Sigh.  I did try putting the quoted null in.

   tell process "Finder"
   tell application process "Finder"
Seem to be equivalent. I wonder if there is something to learn about a possible difference?

   click menu item 1
   click of menu item 2
A similar question springs to mind.
--

--> From the U S of A, the only socialist country that refuses to admit it. <--
 _______________________________________________
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

  • Follow-Ups:
    • Re: System Events scripting of Finder window
      • From: kai <email@hidden>
  • Prev by Date: Re: System Events scripting of Finder window
  • Next by Date: Re: System Events scripting of Finder window
  • Previous by thread: Re: System Events scripting of Finder window
  • Next by thread: Re: System Events scripting of Finder window
  • Index(es):
    • Date
    • Thread