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

Re: I made a nightmare


  • Subject: Re: I made a nightmare
  • From: Axel Luttgens <email@hidden>
  • Date: Wed, 09 Dec 2015 18:19:06 +0100

> Le 9 déc. 2015 à 16:51, Yvan KOENIG a écrit :
>
> […]
> To be honest too, here is a script with the several attempts I made.
> […]
> System Events refuse every attempts to get POSIX path of something.
> For my point of view it’s not too surprising and it’s why I used tell me to.
> What is puzzling is the fact that even when I use tell me to, set dest to quoted form of Posix path of aString — which is a correctly formed path - fails too

Hello again, Yvan.

I’m still on 10.10.5 here, but could you try this one:

tell application "System Events"
	-- Let's be sure to have a SE item.
	set F to file "Sans titre.pages" of desktop folder
	-- Let's ask SE to get that item's POSIX path (works fine, here)
	set P to POSIX path of F
	-- Let's ask SE to get the POSIX path of the resulting string.
	— Fails as expected here.
	— Note the «class posx» in the error message.
	POSIX path of P
end tell

This would allow us to see whether 10.11.2 came with some changes.

Going further with your experiments:

tell application "System Events"
	-- Let's be sure to have a SE item.
	set F to file "Sans titre.pages" of desktop folder
	-- Let's ask SE to get that item's POSIX path (works fine, here)
	set P to POSIX path of F
	tell me
		-- Let's ask "me" to get the POSIX path of the resulting string.
		-- Fails too (as expected); note the «class posx» in the error message.
		POSIX path of P
	end tell
end tell

In fact, even if "telling me", one is still making use of SE’s terminology.

This is to be contrasted with:

tell application "System Events"
	-- Let's be sure to have a SE item.
	set F to file "Sans titre.pages" of desktop folder
	-- Let's ask SE to get that item's POSIX path (works fine, here)
	set P to POSIX path of F
end tell
-- Works: one is making use of SA's lenient POSIX path.
POSIX path of P

HTH,
Axel
 _______________________________________________
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: Yvan KOENIG <email@hidden>
References: 
 >I made a nightmare (From: Yvan KOENIG <email@hidden>)
 >Re: I made a nightmare (From: Axel Luttgens <email@hidden>)
 >Re: I made a nightmare (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: I made a nightmare
  • Next by Date: Re: I made a nightmare
  • Previous by thread: Re: I made a nightmare
  • Next by thread: Re: I made a nightmare
  • Index(es):
    • Date
    • Thread