• 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: System Events versus Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events versus Finder


  • Subject: Re: System Events versus Finder
  • From: Axel Luttgens <email@hidden>
  • Date: Wed, 27 Feb 2008 13:09:47 +0100

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)


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: System Events versus Finder
      • From: KOENIG Yvan <email@hidden>
References: 
 >System Events versus Finder (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: What's wrong with this call to zip?
  • Next by Date: Re: What's wrong with this call to zip?
  • Previous by thread: System Events versus Finder
  • Next by thread: Re: System Events versus Finder
  • Index(es):
    • Date
    • Thread