浏览器插件(从地址栏获取网址) [英] browser plugin(to get url from address bar)

查看:139
本文介绍了浏览器插件(从地址栏获取网址)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助查找,插入源代码以从地址栏中读取url.
例如,www.google.com,Facebook等.

Can any one help to find,plugin source code to read url from address bar.
like,www.google.com,Facebook,etc.
it might be from any browser(like mozilla,chrome).

推荐答案

好吧,您要执行的任务非常具有挑战性,我认为如果我比较有经验使用Windows编程(假设您正在Windows中编程),我可以为您提供更好的答案.快速的Google搜索为我提供了以下选项:

有些人建议使用DDE(动态数据交换),我发现它非常慢,而且我担心只适合C#和VB(也许不适合...).

另一个建议的解决方案"将重点放在选定的浏览器进程上(使用编程),然后使用sendkey来完成所需的操作,建议的组合是Ctrl + L(集中在地址栏上),Ctrl + A(用于确保已标记整个文本),当然要进行复制,请按Ctrl + C.当然,这是Windows解决方案,它对用户可见.我不知道它是否使您满意(您可能需要一个与用户的其他活动集成的解决方案...)

请告诉我您是否认为足够,否则,我将尝试找到其他解决方案...
Well, The task you are asking for is quite challenging, I think that if I was more experienced with Windows Programming (assuming you''re programming in windows), I could be providing you a better answer. A quick Google search has offered me the following options:

There are some people who were suggesting to use DDE (Dynamic Data Exchange), which I found out to be very slow and I''m afraid that would fit C# and VB only (Maybe not...).

Another suggested "solution" would to be focus on the selected browser process (using programming), and then use sendkeys, to do what you wanted, the suggested combo is Ctrl+L (focus on the address bar), Ctrl+A (to make sure that the whole text is marked) and Ctrl+C of course, in order to copy. Of course, this is a Windows solution, and its visible to the user. I don''t know if it satisfies you (you might want a solution that is integrating with other activities by the user...)

Please, tell me if you found it sufficient, If not, I''ll try find some other solutions...


您可以从发送功能中获取完整的网址
int send(
__在SOCKET中,
__in const char * buf,
__in int len,
__in int标志
);
包含http的buf可以进行一些字符串操作
并获得主机名,如果不尝试使用WSAsend
you can get complete url from send function
int send(
__in SOCKET s,
__in const char *buf,
__in int len,
__in int flags
);
buf contain http u can do some string manipulation
and get host name also it work for all browser if not try with WSAsend


这篇关于浏览器插件(从地址栏获取网址)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆