Re: Automatically Launching an App
Re: Automatically Launching an App
- Subject: Re: Automatically Launching an App
- From: Greg Robbins <email@hidden>
- Date: Thu, 10 Apr 2003 13:51:08 -0700
At 9:01 AM -0400 4/9/03, I'm a Llama wrote:
>
How would I go about making launcher.app automatically launch when a certain
>
file associated with it is downloaded (definitely IE, but preferably any other
>
browser too).
Here's an answer posted a few weeks ago in carbon-dev.
---
>
So, the question is: how do I get the browser to launch my application
>
after the .ext file has been downloaded?
Note that what browsers try to go on in choosing a helper app for a downloaded file is the MIME type supplied with the file by the web server, not the file extension.
Use InternetConfig. Roughly, the sequence to add a helper app is:
ICStart
NewHandle (for a mapHandle to hold the mapping preference)
ICFindPrefHandle (finding kICMapping)
ICAddMapEntry
(or ICSetMapEntry to replace an entry if you know its position in the handle)
ICSetPrefHandle
DisposeHandle
ICStop
Documentation is at
<
http://www.quinn.echidna.id.au/Quinn/Config/Prog_Docs.html>
<
http://developer.apple.com/techpubs/macosx/Carbon/networkcomm/InternetConfig/internetconfig.html>
InternetConfig is supported in both Mac OS 9 and Mac OS X, though the settings are saved in different files for each OS, so browsers running in classic will not respond to settings written by a native application.
Greg Robbins
_______________________________________________
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.