IE
provides easy access to a IWebBrowser2
and IHtmlDocument2
from a HWND
of a IE Frame. So you EnumWindows
and EnumChildWindows
and then you test the class and once you find the right ones, you can easily interact with them.
If there a way to list all open Mozilla Firefox tabs in a
"MozillaWindowClass"
(having itsHWND
), viaXPCOM
and C++?
I've googled long and strong but can't find much on the subject. I don't want to develop an extension / add-on but want to control the browser externally from an unrelated EXE, not from an extension DLL. Or at least some read-only access to it.
Note that supporting binary components in a FF is a PITA so I don't suggest you take that road without a good reason.
However, once you have an extension and a binary component the way to get a HWND from a tab is this (hope it still works, we stopped supporting FF many versions back):
With this and the notifications from the JS your binary component could provide a look up to find a tab by HWND and do stuff with it.