Re: are finder items items? what is a vector?
Re: are finder items items? what is a vector?
- Subject: Re: are finder items items? what is a vector?
- From: Jon Pugh <email@hidden>
- Date: Wed, 23 Dec 2009 14:44:41 -0800
At 10:44 PM +0100 12/23/09, Brennan wrote:
>I'm trying to write a script which will invert the Finder selection.
I don't claim this is the only or even the best way, but it works. ;)
Jon
tell application "Finder"
set inverted to {}
set itemNames to name of items of window 1
set selectedNames to {}
set s to selection
repeat with i in s
copy name of i to end of selectedNames
end repeat
set newSelection to {}
repeat with i in itemNames
if i is not in selectedNames then
copy item i of window 1 to end of newSelection
end if
end repeat
select newSelection
end tell
_______________________________________________
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