• 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 19:11:31 +0200

I don't understand, When I tested under 10.4.11,
 I always got the class "«class folder»" for folders.
I tried under 10.6 and got "folder"
Now, I'm back under 10.4.11 and get folder.

So, I changed the test to take care of the two encountered results.


set droppedItems to {"Macintosh HD:Users:yvan_koenig:Desktop:for_Merge:", "Macintosh HD:Users:yvan_koenig:Desktop:fakeDB.cwk", "Macintosh HD:Users:yvan_koenig:Desktop:tables_chaînées.numbers:"} 

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 in {"«class cfol»", "folder"} 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
log theClass
try
ProcessFile(currentItem, PictureDate, fontSize)
end try
end if
end repeat

and I got the report:

tell application "System Events"
get class of disk item "Macintosh HD:Users:yvan_koenig:Desktop:for_Merge:"
folder
end tell
tell current application
beep
say "Folders are not allowed."
display dialog "Folders are not allowed!" buttons {"OK"} giving up after 10
{button returned:"OK", gave up:false}
end tell
tell application "System Events"
get class of disk item "Macintosh HD:Users:yvan_koenig:Desktop:fakeDB.cwk"
file
(*file*)
get class of disk item "Macintosh HD:Users:yvan_koenig:Desktop:tables_chaînées.numbers:"
file package
(*file package*)
end tell


Yvan KOENIG (VALLAURIS, France) vendredi 9 octobre 2009 19:10:28


 _______________________________________________
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

References: 
 >not all dropped items make it (From: Robert Poland <email@hidden>)
 >Re: not all dropped items make it (From: Yvan KOENIG <email@hidden>)
 >Re: not all dropped items make it (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Open folders in new window
  • Next by Date: how to suppress or ignore errors?
  • Previous by thread: Re: not all dropped items make it
  • Next by thread: Re: Open folders in new window
  • Index(es):
    • Date
    • Thread