自动调用IE打开某一个网站
2012-10-26 15:26
232 查看
import win32gui import win32com import win32com.client import pythoncom import time class Test: def runtest(self): print 'test' class EventHandler: def OnVisible(self,visible): global bVisibleEventFired bVisibleEventFired = 1 def OnDownloadBegin(self): print 'DownloadBegin' self.runtest() self.value = 1 def OnDownloadComplete(self): print 'DownloadComplete' self.value += 1 def OnDocumentComplete(self,pDisp=pythoncom.Missing,URL=pythoncom.Missing): print 'documentComplete of %s' %URL print self.value class H(Test,EventHandler): pass ie = win32com.client.DispatchWithEvents('InternetExplorer.Application',H) ie.Visible = 1 ie.Navigate("www.eotao.com") pythoncom.PumpMessages() ie.Quit()
相关文章推荐
- Python自动调用IE打开某个网站的方法
- Python自动调用IE打开某个网站的方法
- VC调用IE打开网站
- 设置IE安全并打开自动仿冒网站筛选器和IE安全设置
- winform里如何按一个button后用IE打开一个指定的网站
- 用eclipse打开一个文件,左边的树怎么自动对应文件
- 一个深刻的教训——VS打开项目后自动关闭
- 4000 建立一个不能打开的文件(占坑)---C语言高级API调用
- IE打开网站时出现Office安装框……
- 一个自动下载灰鸽子的网站
- 使用java的html解析器jsoup和jQuery实现一个自动重复抓取任意网站页面指定元素的...
- 使用java的html解析器jsoup和jQuery实现一个自动重复抓取任意网站页面指定元素的web应用
- 清除缓存并自动打开IE的脚本(win7)
- 用C++,调用浏览器打开一个网页
- 一个好用的基于FireFox的网站更新自动提醒插件
- [转]IE点击链接没有反应或打开新窗口出现一个空白框(地址栏空白)的解决方法
- C# 只开启一个程序,如果第二次打开则自动将第一个程序显示到桌面
- [转帖]调用explore打开指定文件所在的文件夹,并把目标文件设为选定状态,甚至.lnk文件也能自动找到它的目标执行程序文件。
- VB 调用打开各种文件(自动查找使用默认的程序)
- 写了一个自动搜索特征码来定位地址的DLL,附带VB调用源代码