views:

33

answers:

1

No, this is not a send me teh codez request.

I am writing a small utility for my own amusement. In this regard, I need the utility to read the URL from the visible/active tab on any of the three browsers (Firefox, IE, Chrome) that are currently open, and then go off and do something with that URL.

I am assuming I'll need to PInvoke for some of the stuff, may be EnumWindows, or GetForegroundWindow or some such. I've ample experience in Win32 API, but at the moment, I'll need to poke around a bit as it's been a long time since I used to have them for lunch, and used to read SDK documentation as a means of entertainment and amusement.

I am trying to think of ways of retrieving the text from the active browser's active tab's address bar. Any pointers in the right direction will be much appreciated.

A: 

Well, this example uses EnumChildWindows, but you may have trouble getting it to work in a UAC-enabled, Low Rights IE world.

jeffamaphone