• 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
Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way


  • Subject: Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way
  • From: Grant Erickson <email@hidden>
  • Date: Wed, 16 Sep 2009 10:37:32 -0700
  • Organization: Nuovation System Designs, LLC
  • Thread-topic: Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way

I am attempting to author an AppleScript that opens a particular preference
pane in System Preferences in a localization-safe way and had the following
working well in 10.5:

    tell application id "com.apple.systempreferences"
        activate
        set the current pane to the pane id "com.nuovations.foo"
    end tell

However, this fails in 10.4 with the following error:

    "Syntax Error
     A identifier can't go after this identifier."

with "current pane" highlighted. This, of course because "id" is an unknown
application attribute in 10.4 having been only introduced in 10.5.

So, instead, I implemented:

    tell application "Finder"
        set theApplication to displayed name of application file id
"com.apple.systempreferences"
    end tell

    tell application theApplication
        activate
        set the current pane to the pane id "com.nuovations.foo"
    end tell

However, I get the same error. If I comment out the "set the current
pane..." line and just 'activate' it works fine.

What's the correct, 10.4-compatiable way to perform an application tell in a
localization-safe manner?

Regards,

Grant


 _______________________________________________
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: Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: faulty logic, mine
  • Next by Date: Re: faulty logic, mine
  • Previous by thread: Re: faulty logic, mine
  • Next by thread: Re: Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way
  • Index(es):
    • Date
    • Thread