• 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
I made a nightmare
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I made a nightmare


  • Subject: I made a nightmare
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 09 Dec 2015 14:46:39 +0100

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






 _______________________________________________
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: I made a nightmare
      • From: "S. J. Cunningham" <email@hidden>
    • Re: I made a nightmare
      • From: 2551 <email@hidden>
    • Re: I made a nightmare
      • From: Axel Luttgens <email@hidden>
    • Re: I made a nightmare
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: I really need some help
  • Next by Date: Re: I really need some help
  • Previous by thread: Re: best approach?
  • Next by thread: Re: I made a nightmare
  • Index(es):
    • Date
    • Thread