• 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: Bernard Desgraupes <email@hidden>
  • Date: Mon, 21 Jun 2004 21:44:54 +0200

Christopher Nebel wrote:


See <http://developer.apple.com/documentation/Carbon/Reference/ LaunchServicesReference/LSRReference/function_group_2.html#//apple_ref/ c/func/LSOpenCFURLRef>, and also its slightly more complicated but more flexible sibling LSOpenFromURLSpec at <http://developer.apple.com/documentation/Carbon/Reference/ LaunchServicesReference/LSRReference/function_group_2.html#//apple_ref/ c/func/LSOpenFromURLSpec>. If you need anything opened, Launch Services is your friend.

Yes it's just great. I replaced my AppleEvent by just two lines of code like this to achieve what I need. It calls Safari or Mail just fine depending on the Url I apply it to:

theCFUrl = CFURLCreateWithBytes(kCFAllocatorDefault, (const UInt8 *) urlCString, strlen(urlCString),
CFStringGetSystemEncoding(), NULL);

error = LSOpenCFURLRef(theCFUrl, &outLaunchedURL);


Thanks very much for the help,

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


References: 
 >Re: Error with GURL/GURL (From: jj <email@hidden>)
 >Re: Error with GURL/GURL (From: Christopher Nebel <email@hidden>)
 >Re: Error with GURL/GURL (From: Bernard Desgraupes <email@hidden>)
 >Re: Error with GURL/GURL (From: Christopher Nebel <email@hidden>)

  • Prev by Date: OT : Javascript image size undefined
  • Next by Date: Re: OT : Javascript image size undefined
  • Previous by thread: Re: Error with GURL/GURL
  • Next by thread: Re: Error with GURL/GURL
  • Index(es):
    • Date
    • Thread