• 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: Reveal / Select in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reveal / Select in Finder


  • Subject: Re: Reveal / Select in Finder
  • From: DeNigris Sean <email@hidden>
  • Date: Fri, 1 Jan 2010 14:26:07 -0500

I'd like to be able to have my AppleScript "open" FolderB2 in list view

If you don't mind using GUI scripting, opening B2 (you want to expand that part of the tree, right?) is easy:
tell application "System Events"
tell process "Finder"
click UI element 1 of group 1 of row [whatever row it is] of outline 1 of scroll area 2 of splitter group 1 of window 1
end tell
end tell


but have FolderA at the top.
When you say "on top," do you mean that you want the list view scrolled down to the point that A is at the top of the view?
If so...
tell application "System Events"
tell process "Finder"
set value of value indicator 1 of scroll bar 1 of scroll area 2 of splitter group 1 of window 1 to 0.204
But obviously this would be pretty fragile, possibly breaking whenever files are added/removed.  You could add a method that calculates based on the location of A's row.

Sean DeNigris
email@hidden
 _______________________________________________
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

  • Next by Date: Use AS operators dinamically
  • Next by thread: Use AS operators dinamically
  • Index(es):
    • Date
    • Thread