Re: System Events versus Finder
Re: System Events versus Finder
- Subject: Re: System Events versus Finder
- From: KOENIG Yvan <email@hidden>
- Date: Wed, 27 Feb 2008 13:58:22 +0100
Le 27 févr. 2008 à 13:09, Axel Luttgens a écrit :
Le 27 févr. 08 à 12:39, KOENIG Yvan a écrit :
Hello
I met what appears to be an odd behaviour.
If I have a variable named source containing a pathname (class
alias)
tell application "Finder" to set dossier to (container of source)
as Unicode text
works well but
tell application "System Events" to set dossier to (container of
source) as Unicode text
doesn't.
Error message:
Impossible de transformer «class cfol» "Macintosh
HD:Users:yvankoenig:Desktop:" of application "System Events" en
Unicode text.
Is it a normal behaviour ?
System Events does not proceed with coercions and directly provides
the path as a property of disk items; this holds for both the "Mac
style" path and the posix path:
tell application "System Events" to set dossier to path of
(container of source)
tell application "System Events" to set dossier to posix path of
(container of source)
Thanks
I was not aware of this feature.
Yvan KOENIG _______________________________________________
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