• 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: old script fails AND BUG in Smile 3.5.2 (build 609)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: old script fails AND BUG in Smile 3.5.2 (build 609)


  • Subject: Re: old script fails AND BUG in Smile 3.5.2 (build 609)
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 26 Mar 2010 15:15:44 +0100


Le 25 mars 2010 à 22:19, Robert Poland a écrit :

Hi,

OS 10.6.2.

This (portion of) script ,after five years of using it, fails. What has changed?

on run
set myFolder to choose folder
tell me to open {myFolder}
end run

on open (droppedItems)
repeat with index from 1 to the count of droppedItems

-- display dialog (count of droppedItems) & " " & index & " " & droppedItems as string

set currentItem to (item index of droppedItems)
tell application "Finder" to set theKind to kind of currentItem

-- display dialog theKind as string

if theKind is not "Folder" then
ignoring application responses
say "Only folders are allowed."
end ignoring
tell application "System Events"
activate
display dialog "Only folders are allowed!" buttons {"OK"} default button "OK" giving up after 10
end tell
-- return -- quit
end if
beep 2
end repeat
beep
end open


I will never use a test based on the kind value.
This one is localized so, when for you English speaking theKind is "folder", for me French speaking, it's "dossier".

I would use:

tell application "Finder" to set theKind to class of ( item ( currentItem as text)) as text

Are you getting your problem on an English system ?

Yvan KOENIG (VALLAURIS, France) vendredi 26 mars 2010 15:15:38


 _______________________________________________
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: old script fails AND BUG in Smile 3.5.2 (build 609)
      • From: Robert Poland <email@hidden>
References: 
 >old script fails AND BUG in Smile 3.5.2 (build 609) (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: old script fails AND BUG in Smile 3.5.2 (build 609)
  • Next by Date: Re: old script fails AND BUG in Smile 3.5.2 (build 609)
  • Previous by thread: Re: Unwanted Response
  • Next by thread: Re: old script fails AND BUG in Smile 3.5.2 (build 609)
  • Index(es):
    • Date
    • Thread