views:

50

answers:

1

Is there a way to detect that an active application obtained via shared workspace

(NSWorkspace.sharedWorkspace().activeApplication()

is a browser (without running through the list of browsers and comparing to its 'NSApplicationName' and then extract its url (current tab) in ObjC?

Alternatively, would I be more successful using Python's subprocess module to do this? Any pointers would be appreciated.

A: 

I ended up going with Applescript for this, but unfortunately not all browsers are scriptable (e.g. Firefox) and require hackish methods to grab the URL.

David K