• 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: "open location" osax question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "open location" osax question


  • Subject: Re: "open location" osax question
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 14 Feb 2005 11:15:43 -0800

On Feb 11, 2005, at 3:43 PM, Marc K. Myers wrote:

I wrote a script to do a Google query to get the lyrics of whatever track iTunes is playing. It assembles the URL and then uses "open location" to send it. I found that

    open location theURL

doesn't do anything.  But if I say

    tell application "Safari" to open location theURL

it works perfectly. I'm wondering why that is. My understanding was that the osax could be used anywhere and would open the default application for the protocol of the URL.

Not really, no. What it does is tell the targeted application to open that URL. There's a default handler installed by the system that will open it in the default application for the URL scheme, but applications can (and obviously do) override that with their own handlers. There's actually no way to distinguish the "tell this particular application" case from the "just open the URL using the appropriate application" case -- you simply have to tell an application that won't have any custom handling. As a script, "me" is pretty reliable for this purpose.



--Chris Nebel AppleScript Engineering

_______________________________________________
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:
    • Quark 6.5 Insert text into insertion point Broken?
      • From: Jason Bourque <email@hidden>
References: 
 >"open location" osax question (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: Re: Slightly OT: InDesign cells/tables
  • Next by Date: downloading a file into a folder
  • Previous by thread: Re: "open location" osax question
  • Next by thread: Quark 6.5 Insert text into insertion point Broken?
  • Index(es):
    • Date
    • Thread