• 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: Test for Desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test for Desktop


  • Subject: Re: Test for Desktop
  • From: Jolly Roger <email@hidden>
  • Date: Thu, 15 Feb 2001 16:14:34 -0600
  • Replyto: email@hidden

on 2/15/2001 3:35 PM, Brad Giesbrecht (email@hidden) wrote:

> Hello List,
>
> How do I test if the items in a Finder selection
> reside in one of my Desktop folders?

Here's one way:

tell application "Finder" to set itemList to items of selection
set startupDesktop to the path to the startup disk as text & "Desktop
Folder:"

set foundDesktopItems to false
repeat with nextItem in itemList
log (nextItem as text)
if (nextItem as text) contains startupDesktop then
set foundDesktopItems to true
exit repeat
end if
end repeat

if foundDesktopItems then
log "one or more items are on the desktop"
else
log "no items are on the desktop"
end if

(Watch for line wraps and character translations by the list server.)

HTH

JR


References: 
 >Test for Desktop (From: Brad Giesbrecht <email@hidden>)

  • Prev by Date: Re: Choose from list change in AS 1.5.5
  • Next by Date: Re: Help with desktop printing
  • Previous by thread: Test for Desktop
  • Next by thread: Re: Test for Desktop
  • Index(es):
    • Date
    • Thread