• 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: Select certain items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Select certain items
      • From: Bill Briggs <email@hidden>
References: 
 >Select certain items (From: Pablo Misas <email@hidden>)

  • Prev by Date: Re: Playing a simple movie from quicktime
  • Next by Date: Re: It happened again.
  • Previous by thread: Select certain items
  • Next by thread: Re: Select certain items
  • Index(es):
    • Date
    • Thread