[英]How do I get the URL of the visible tab in Firefox/IE/Chrome?
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.
在这方面,我需要该实用程序从当前打开的三个浏览器(Firefox,IE,Chrome)中的任何一个的“可见/活动”选项卡中读取URL,然后关闭并对该URL进行处理。
I am assuming I'll need to PInvoke for some of the stuff, may be EnumWindows, or GetForegroundWindow or some such. 我假设我需要PInvoke一些东西,可能是EnumWindows或GetForegroundWindow或类似的东西。 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.
我在Win32 API方面拥有丰富的经验,但是目前,我需要回顾一下,因为我过去很长时间以来一直将它们用作午餐,并且习惯于阅读SDK文档作为娱乐和娱乐的手段。娱乐。
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.
任何朝着正确方向的指针将不胜感激。
好的,此示例使用EnumChildWindows,但是您可能很难使它在启用UAC的低权限IE世界中运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.