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

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


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

Le 26 mars 2010 à 16:49, email@hidden a écrit :

You could insert this into your script:
tell application "Finder"
  set theKind to class of item (currentItem as text)
  if theKind is folder then set theKind to "folder"
end tell

In place of:

set theKind to kind of currentItem

Yours and mine return "folder" it the treated item is a folder.

Also, I'd still caution against using index as a variable, it is an appleScript keyword. In general, if your compiler colors a variable differently than the other variables in your script, you should pick a different name for the variable.

I definitively agree.
This is why, to be free of this kind of problem, I use French_like names for the variables in my own scripts.


Yvan KOENIG (VALLAURIS, France) vendredi 26 mars 2010 17:01:36




_______________________________________________ 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: Rep: old script fails AND BUG in Smile 3.5.2 (build 609)
      • From: Robert Poland <email@hidden>
    • Re: Rep: old script fails AND BUG in Smile 3.5.2 (build 609)
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: old script fails AND BUG in Smile 3.5.2 (build 609)
  • Next by Date: Re: Back and forth between Posix and HFS paths
  • Previous by thread: Re: Keychain Scripting question
  • Next by thread: Re: Rep: old script fails AND BUG in Smile 3.5.2 (build 609)
  • Index(es):
    • Date
    • Thread