Re: Rep: old script fails AND BUG in Smile 3.5.2 (build 609)
Re: Rep: old script fails AND BUG in Smile 3.5.2 (build 609)
- Subject: Re: Rep: old script fails AND BUG in Smile 3.5.2 (build 609)
- From: Yvan KOENIG <email@hidden>
- Date: Fri, 26 Mar 2010 21:25:57 +0100
Le 26 mars 2010 à 17:33, Luther Fuller a écrit : You might want to try this script ...
set itemAlias to alias "OS_X:Users:lutherfuller:Desktop:untitled folder 2" -- for example tell application "Finder" if (class of item itemAlias) is folder then beep 2 -- folder = «class cfol» (class of item itemAlias) as text display dialog the result end tell
Where ... class of item itemAlias --> «class cfol»
In English, «class cfol» compiles to folder . In another language, it compiles to something else. There is no need to use (class of item itemAlias) as text , and it may give you trouble if you want to internationalize your script. What does «class cfol» compile to on your (non-English) Mac? Here, on my French system, when I run :
set itemalias to path to applications folder tell application "Finder" set classOf to (get class of item itemalias) try classOf * 1 on error errMsg display dialog "" & errMsg end try end tell
in the script editor, the log report is:
tell current application path to applications folder alias "Macintosh HD:Applications:" end tell tell application "Finder" get class of item (alias "Macintosh HD:Applications:") folder display dialog "Impossible de transformer «class cfol» en type number." {button returned:"OK"} end tell
Same behavior with 10.4.11 and 10.6.2
Yvan KOENIG (VALLAURIS, France) vendredi 26 mars 2010 21:25:50
|
_______________________________________________
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