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

selection of finder list view


  • Subject: selection of finder list view
  • From: Alex da Franca <email@hidden>
  • Date: Sun, 21 Jan 2007 20:20:36 +0100

Hi list,

I am pretty new to applescript and I am having a hard time to figure out how to get the selected line(s) of a finder window in list view.

what I have so far is:

activate application "Finder"
tell application "System Events"
if UI elements enabled then
tell application process "Finder"
return value of attribute "AXSelectedRows" of outline 1 of scroll area 2 of splitter group 1 of window 1
end tell
end if
end tell



I have that line from prefab. it is supposed to be an array, but somehow all I get is: {application "System Events"}

I also tried:
the selected rows of outline1

but depite the fact, that

the rows of outline 1

work, the selected rows don't seem to work.

prefab however is able to determine the selected rows.
I am only able to tell which rows are selected by repeating through "rows" and check which one has its "selected" property set to true.


repeat with i from 1 to the number of rows
	tell row i
		if selected then
			....
		end if
	end tell
end repeat

this is slow, if I have a finder window with many items and the selected file is at the botton.
somehow there must be a better way, as the information seems to be there in "AXSelectedRows", but I didn't find anything helpful about AXSelectedRows via google.


please help.





Best regards

 -------------------      Alexander da Franca        ----------------
 Multimedia Developer   |_________________________|   Lingo Programmer
 -------------------  <http://www.farbflash.de>  ----------------


_______________________________________________ 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: Luther Fuller <email@hidden>
  • Prev by Date: Re: Photoshop warp and smart object script - is that possible?
  • Next by Date: Re: selection of finder list view
  • Previous by thread: Re: Photoshop warp and smart object script - is that possible?
  • Next by thread: Re: selection of finder list view
  • Index(es):
    • Date
    • Thread