Re: selection of finder list view
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