Getting mad with simple applescript handling (kAEGetURL)
Getting mad with simple applescript handling (kAEGetURL)
- Subject: Getting mad with simple applescript handling (kAEGetURL)
- From: Yann Bizeul <email@hidden>
- Date: Tue, 17 Jun 2003 16:54:15 +0200
Hi,
I just want to write a little protocol handler, as seen in docs and
ML, Safari send an apple event kAEGetURL to the correct application.
So, I register for this apple event like this :
[[ NSAppleEventManager sharedAppleEventManager ]
setEventHandler: self
andSelector: @selector(getUrl:withReplyEvent:)
forEventClass: kInternetEventClass
andEventID: kAEGetURL ];
And this method gets called as expected :
- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:
(NSAppleEventDescriptor *)replyEvent;
{
NSLog(@"%@",[ event stringValue ]);
}
Without success, stringValue is (null). So I think I'm not trying to
get things the right place, can somebody tell me where to get the URL ?
I see it when doing this :
NSLog(@"string : %@", [[ NSString alloc ] initWithData: [ event
data ] encoding: NSASCIIStringEncoding ]);
But with lot of garbage before, so that's not a good solution :-)
Thanks for your help
--
Yann Bizeul
TYNSOE.ORG -
http://www.tynsoe.org/
Site technique consacri ` MacOS X
_______________________________________________
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.