Hello
I’ running under 10.11.2
I try to run this simple script :
set theName to "trucmuche" --set sourcefolder to (path to desktop as text) & "formoosmahna:" as alias set sourcefolder to choose folder tell application "System Events" if not (exists folder theName of sourcefolder) then make new folder at end of sourcefolder with properties {name:theName} end if -- set dest to quoted form of POSIX path of ((sourcefolder as text) & theName) tell me to set dest to quoted form of POSIX path of ((sourcefolder as text) & theName) end tell
and I get an awful :
Résultat : error « Il est impossible d’obtenir POSIX path of \"SSD 500:Users:ME:Desktop:formoosmahna:trucmuche\"." number -1728 from «class posx» of "SSD 500:Users:ME:Desktop:formoosmahna:trucmuche"
Same result if I don’t insert « tell me to ». I made several attempts and the only one behaving flawlessly is :
set theName to "trucmuche" --set sourcefolder to (path to desktop as text) & "formoosmahna:" as alias set sourcefolder to choose folder tell application "System Events" if not (exists folder theName of sourcefolder) then make new folder at end of sourcefolder with properties {name:theName} end if set dest to my quoteIt((sourcefolder as text) & theName) end tell
on quoteIt(aPath) return quoted form of POSIX path of aPath end quoteIt
As far as I remember, the initial syntax behaved well in recent past. Is it a new behavior introduced by 10.11.2 ?
Yvan KOENIG running El Capitan 10.11.2 in French (VALLAURIS, France) mercredi 9 décembre 2015 14:42:36
|