• 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: Error with GURL/GURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with GURL/GURL


  • Subject: Re: Error with GURL/GURL
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 21 Jun 2004 10:52:18 -0700

On Jun 21, 2004, at 6:00 AM, jj wrote:

Can someone tell me what's wrong with this simple script (which used to
work under Jaguar AFAIR):

tell application "Finder"
open location "http://sourceforge.net/projects/rezilla";
end tell

I get an error, something like "Some data do not have the correct type"

"open location" is part of the Standard Addition osax, and the Finder thinks
it should handle the GURLGURL event...

Specifically, it thinks it should handle it as a WebDAV mount, which of course it isn't, hence the error. In general, telling a particular application to "open location" will not do what you want, unless what you wanted was *that particular application* to open it.

If you're doing this from C, then you should be aware that "open location" is really just a wrapper around LSOpenCFURLRef, which would be much more efficient and will always open the URL in the preferred application for "http" URLs no matter what weird GURLGURL handlers are lurking about. If you're writing in C, calling AppleScript is usually not the right thing to do unless you're actually trying to run a non-trivial script.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Error with GURL/GURL
      • From: Bernard Desgraupes <email@hidden>
References: 
 >Re: Error with GURL/GURL (From: jj <email@hidden>)

  • Prev by Date: Re: quit the dock - possible?
  • Next by Date: Re: Error with GURL/GURL
  • Previous by thread: Re: Error with GURL/GURL
  • Next by thread: Re: Error with GURL/GURL
  • Index(es):
    • Date
    • Thread