用VBS吧:
set ie=wscript.createobject("internetexplorer.application","event_") '创建ie对象'
ie.fu ...
9zhmke 发表于 2015-4-14 13:57
多谢。。。运行过程中,遇到一点小问题。。。。- set ie=wscript.createobject("internetexplorer.application","event_") '创建ie对象'
- ie.fullscreen=0:ie.menubar=0:ie.addressbar=0:ie.toolbar=0:ie.statusbar=0:ie.resizable=0
- ' 不使用全屏 '取消菜单栏 '取消地址栏 '取消工具栏 '取消状态栏 '不允许用户改变窗口大小
- tmp3=ie_zoom/100000*790
- set tmp1=createobject("htmlfile"):set tmp2=tmp1.parentwindow.screen:tmp1=tmp2.width:set tmp2=nothing
- 'if tmp1<790 then msgbox "屏幕太小,显示不完,驱动显卡后再运行吧":ie.quit:wscript.quit
- if tmp3>tmp1 then '超出屏幕宽度不便查看,临时改回去不缩放
- WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Zoom\ZoomFactor",100000,"REG_DWORD"
- tmp3=790
- end if
- ie.width=tmp3:ie.height=630:ie.top=2:ie.visible=0:ie.navigate "http://www.baidu.com"
- '宽 '高 '打开页面
- ie.left=int((tmp1-ie.width)/2) '左边水平居中
-
- ie.visible=1
- '窗口可见'
- WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Zoom\ZoomFactor",ie_zoom,"REG_DWORD" '恢复缩放比例
复制代码
|