• 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
Conflict of interests btw System Events and Standard Additions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conflict of interests btw System Events and Standard Additions


  • Subject: Conflict of interests btw System Events and Standard Additions
  • From: Daniel Jalkut <email@hidden>
  • Date: Tue, 13 Sep 2005 17:57:54 -0400


Jon Gruber had an interesting entry on his blog, about one of the frustrating elements of the current state of AppleScript affairs.


He noticed that if you ask System Events for a "path to" something "from user domain", it seems to ignore the domain part of the request.

I looked into this more carefully and discovered the cause: System Events defines "user domain" as an object, while Standard Additions defines it as an enumeration. When you use the standard additions "path to" command from within a System Events scope, it allow the "user domain" object from System Events to override the parameter enumeration from SA.

This is indeed a crappy state of affairs. What is the best workaround for situations like this? I suggested setting a variable outside the System Events scope:

set myUserDomain to user domain

Then you can the path to command like this:

tell application "System Events"
    path to application support from myUserDomain
end

Daniel

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Conflict of interests btw System Events and Standard Additions
      • From: Daniel Jalkut <email@hidden>
    • Re: Conflict of interests btw System Events and Standard Additions
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Scripting Image Events - some kind of bug ?
  • Next by Date: Re: "Numeric overflow"?
  • Previous by thread: Re: Setting the computer name
  • Next by thread: Re: Conflict of interests btw System Events and Standard Additions
  • Index(es):
    • Date
    • Thread