I've recently been working on an app which wants to interact with the user's browser. On my 'native' platform, Mac, I've done two things which work well; now I'm trying to work out how to achieve corresponding effects on Windows.

Firstly, I've defined a custom protocol type, eg "ben:" instead of "ftp:", "mailto:";, etc. Once the user's configured their system to register my app as the handler for the protocol "ben:", clicking on a link in a web page invokes my app, which is sent an AppleEvent from which it can read the full URL. (And this works regardless of browser - ie the mapping of protocol to app occurs at a system level.)

On Windows, I've not found my way to this yet. The Windows 'Internet Options' control panel seems to offer only the opportunity to set applications for six particular protocols - ie you can choose the ftp app, the mail app, etc; when I click on a link with my funny protocol it apparently decides to treat it as an http: request anyway. I don't know whether this is always going to happen, or whether if I could find a way to register a helper app for that protocol, it would then treat it seriously. Is there some advanced way to edit the mapping?

And supposing I found this - or adopted something rarely used, eg the Internet Options control panel allows you to set the handlers for 'internet call', 'calendar' and 'address book', so I could adopt one of these protocols and make my app the handler for it - does anyone know how a Rev app would get sent the URL? I know about the $ variables for reading start up parameters; but if the app's already running, is there some message that it would be sent?

My second approach goes the other way; the user of my app can choose a menu option which figures out what they want to do by looking at the page they're currently viewing in a browser. Again, AppleScript is the key here; the disadvantage is that the code needs tweaking for each browser, but nonetheless it's not that hard for a Rev app to discover the URLs being viewed in most browsers. Is there any way to do something like this on Windows?

TIA,

  Ben Rubinstein               |  Email: [EMAIL PROTECTED]
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to