找回密码
 加入
搜索
查看: 2621|回复: 4

[IE类操作] 【已解决】如何让自己的浏览器只显示某个网址的中间部份并且我的浏览器不能有滚动条

[复制链接]
发表于 2012-10-19 11:51:43 | 显示全部楼层 |阅读模式
本帖最后由 孙晓虎2011 于 2012-10-20 11:39 编辑

如这个网址 http://tv.cntv.cn/live/cctv1/
我只想显示这部份要怎么操作

代码:
#include<ie.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$oIE = _IECreateEmbedded()
GUICreate("我的浏览器", 600, 400, -1, -1)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 40,600, 360)
$GUI_Button_Home = GUICtrlCreateButton("百度", 1, 0, 40, 40)
    $GUI_Button_Back = GUICtrlCreateButton("后退", 60, 0, 40, 40)
    $GUI_Button_Forward = GUICtrlCreateButton("向前", 120, 0, 40, 40)
        GUISetState()
_IENavigate($oIE, "http://tv.cntv.cn/live/cctv1/")
While 1
        $msg = GUIGetMsg()
        Select

                        Case $msg = $GUI_EVENT_CLOSE
                                Exit
                        Case $msg = $GUI_Button_Home
                $oIE.navigate("http://tv.cntv.cn/live/cctv1/")
            Case $msg = $GUI_Button_Back
                $oIE.GoBack
            Case $msg = $GUI_Button_Forward
                $oIE.GoForward
                                EndSelect
WEnd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-10-19 12:43:56 | 显示全部楼层
#include <IE.au3>
$hGUI = GUICreate("Test", 800, 600)
$oIE = _IECreateEmbedded()
$web="http://www.163.com/"
GUICtrlCreateObj($oIE, 10, 10, 780, 580)
GUISetState()
$oIE.navigate("about:blank")
$oIE.document.body.style.border="0"
$oIE.document.write("<body style='border:0;margin:0px'><iframe scrolling=no frameborder=0 src =" & $web & " width=100% height=100%></iframe></body>")
$oIE.refresh
$oIE.document.body.scroll = "no"
Do
    Sleep(20)
Until GUIGetMsg() = -3
 楼主| 发表于 2012-10-19 13:24:22 | 显示全部楼层
多谢二楼。解决了滚动条的问题!
发表于 2012-10-19 13:34:36 | 显示全部楼层
回复 2# haijie1223
因为对网页的东西不是很了解,又不知道有些什么地方可以入门,所以想问一下,使用document.write然后再refresh一下就可以得到我们想要的效果吗?
发表于 2012-10-20 00:15:51 | 显示全部楼层
学习一下~~~~~~~~~~~~~~~~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-29 21:28 , Processed in 0.213983 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表