• 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
Creating and Sending a GURL AppleEvent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating and Sending a GURL AppleEvent


  • Subject: Creating and Sending a GURL AppleEvent
  • From: Kevin LaCoste <email@hidden>
  • Date: Mon, 25 Nov 2002 18:27:40 +0900

Hello.

Does anyone have any sample code that might show how this can be done. I've come up with the following but PB gives me a link error and I'm not sure how to fix it. Any ideas? Will this create a proper GURL AppleEvent?

--

char * appSignature = "MOZZ";
char * testAddress = "http://www.yahoo.com/";;
AppleEvent event, reply;
AEDesc target;

err = AECreateDesc( typeApplSignature, appSignature, sizeof(appSignature), & target );

err = AECreateAppleEvent( 'gurl', 'gurl', & target, kAutoGenerateReturnID, kAnyTransactionID, &event );

err = AEPutParamPtr( &event, keyDirectObject, typeChar, testAddress, strlen( testAddress ) );

err = AESend( &event, &reply, kAENoReply, kAENormalPriority, kAEDefaultTimeout, nil, nil );

--

I know that NSWorkspace can do this but I need to send the AppleEvent directly because it's going to more than one browser.

Oh yes, the link error just in case anyone knows what's wrong...

/usr/bin/ld: /Users/klacoste/Projects/Motto/build/intermediates/Motto.build/master.o illegal reference to symbol: _AESend defined in indirectly referenced dynamic library /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.
framework/Versions/A/HIToolbox

If I comment out the AESend call it compiles and runs just fine. Strange stuff. I imagine I'm missing a header import because I haven't added any new headers or frameworks to the default cocoa project.

Thanks.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Creating and Sending a GURL AppleEvent
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: NSFontPanel again
  • Next by Date: Re: Creating and Sending a GURL AppleEvent
  • Previous by thread: Re: NSFontPanel again
  • Next by thread: Re: Creating and Sending a GURL AppleEvent
  • Index(es):
    • Date
    • Thread