• 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: not all dropped items make it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: not all dropped items make it


  • Subject: Re: not all dropped items make it
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 9 Oct 2009 18:23:06 +0200


Le 9 oct. 2009 à 17:25, Robert Poland a écrit :

Hi,

I've been using this script since 2003, now with Snow Leopard the dropped items are always less that what is dropped and sometimes even remembers items that were previously dropped.

...
repeat with i from 1 to the count of droppedItems
set currentItem to (item i of droppedItems)
tell application "Finder" to set theKind to kind of currentItem
if theKind is "Folder" then
beep
ignoring application responses
say "Folders are not allowed."
end ignoring
tell application "System Events"
activate
display dialog "Folders are not allowed!" buttons {"OK"} giving up after 10
end tell
else -- it's a file
ProcessFile(currentItem, PictureDate, fontSize)
end if
end repeat
...

Is this a Snow leopard bug or do I need to do something to correct it?

Why are you enclosing display dialog (Standard Addition command)
in a tell "System Events" block ?

 I would code:

...
repeat with i from 1 to the count of droppedItems
set currentItem to (item i of droppedItems)
tell application "System Events" to set theClass to (class of disk item (currentItem as text)) as text
if theClass is "«class cfol»" then
beep
ignoring application responses
say "Folders are not allowed."
end ignoring
display dialog "Folders are not allowed!" buttons {"OK"} giving up after 10
else -- it's a file
ProcessFile(currentItem, PictureDate, fontSize)
end if
end repeat
...

Yvan KOENIG (VALLAURIS, France) vendredi 9 octobre 2009 18:22:48


 _______________________________________________
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

  • Follow-Ups:
    • Re: not all dropped items make it
      • From: Robert Poland <email@hidden>
References: 
 >not all dropped items make it (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: not all dropped items make it
  • Next by Date: Re: not all dropped items make it
  • Previous by thread: Re: not all dropped items make it
  • Next by thread: Re: not all dropped items make it
  • Index(es):
    • Date
    • Thread