• 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: John Stewart <email@hidden>
  • Date: Sat, 12 Feb 2005 04:04:36 -0500

On 2/11/05 at -0500 Marc K. Myers said this

>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.

It's because iTunes intercepts the "open location" command then tries to open it as an audio stream and silently fails to do so.

From the iTunes dictionary -

open location: Opens a URL to an audio stream
    open location [string]  -- the URL to open

The solution, as you've indicated, is to direct the URL to something other than iTunes or to remove it from within an iTunes "tell". Using the 'my' keyword would probably also work.

JBS
--
Get a new car for your spouse.  It'll be a great trade!
 _______________________________________________
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: "open location" osax question
      • From: Paul Berkowitz <email@hidden>
References: 
 >"open location" osax question (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: Re: "open location" osax question
  • Next by Date: Frontmost App
  • Previous by thread: Re: "open location" osax question
  • Next by thread: Re: "open location" osax question
  • Index(es):
    • Date
    • Thread