• 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: selection of finder list view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selection of finder list view


  • Subject: Re: selection of finder list view
  • From: kai <email@hidden>
  • Date: Mon, 22 Jan 2007 02:56:36 +0000


On 22 Jan 2007, at 02:45, Alex da Franca wrote:

As I think there must be a simple error in my script, I was interested how to get that selected line of the finder window, without repeating through all and check its selected property, which looks cumbersome to me.

Try something like this, Alex:

----------------------------

if (system attribute "sysv") < 4144 then display dialog ¬
	"This script requires Mac OS X 10.3 or newer." buttons ¬
	{"Cancel"} default button 1 with icon 2

tell application "System Events"
if not UI elements enabled then
tell me to display dialog "Enable GUI Scripting?" with icon 1
set UI elements enabled to true
if not UI elements enabled then error number -128
end if
tell application process "Finder"
set frontmost to true
set tgt to window 1
tell tgt's splitter group 1 to if exists then set tgt to it -- tool bar visible
tell (first row of outline 1 of tgt's scroll area -1 where it is selected)
tell (first UI element of group 1 whose role is "AXFinderItem")
if exists then perform action "AXShowMenu"
end tell
end tell
end tell
end tell


----------------------------

---
kai


_______________________________________________ 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/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: selection of finder list view
      • From: kai <email@hidden>
References: 
 >selection of finder list view (From: Alex da Franca <email@hidden>)
 >Re: selection of finder list view (From: Luther Fuller <email@hidden>)
 >Re: selection of finder list view (From: Alex da Franca <email@hidden>)
 >Re: selection of finder list view (From: Luther Fuller <email@hidden>)
 >Re: selection of finder list view (From: Alex da Franca <email@hidden>)
 >Re: selection of finder list view (From: Bill Briggs <email@hidden>)
 >Re: selection of finder list view (From: Alex da Franca <email@hidden>)

  • Prev by Date: Re: selection of finder list view
  • Next by Date: Re: selection of finder list view
  • Previous by thread: Re: selection of finder list view
  • Next by thread: Re: selection of finder list view
  • Index(es):
    • Date
    • Thread