Re: Select certain items
Re: Select certain items
- Subject: Re: Select certain items
- From: Michelle Steiner <email@hidden>
- Date: Thu, 4 Dec 2003 13:23:51 -0700
On Dec 4, 2003, at 12:29 PM, Pablo Misas wrote:
What I want to do is a script that cleans the desktop. ie: selects all
the files on the desktop but the HD volume, printer files and
documents alias are left untouched.
I tried this:
tell application "Finder"
set foo to (files of the desktop) & (folders of the desktop)
select foo
end tell
It opened the desktop window from the desktop folder in the current
user's folder and selected all the icons in it. The mounted CD was not
in the window, but the Computer window opened with the mounted CD
selected in it.
I then tried this:
tell application "Finder"
select disks of the desktop
--set foo to (files of the desktop) & (folders of the desktop)
--select foo
end tell
It opened the desktop window, added the mounted CD icon to it, and
selected the CD icon.
Alias files are files (and the desktop printer is an alias), so they
are selected along with other files.
But in no instance in my tests were any items in the actual desktop
itself selected.
--
"My country, right or wrong: if right, to be kept right; and if wrong,
to be set right."
Senator Carl Schurz of Missouri, 1899
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.