Re: Test for Desktop
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