找回密码
 加入
搜索
查看: 3490|回复: 7

AU3中,如果加载网页!

[复制链接]
发表于 2008-5-10 13:13:06 | 显示全部楼层 |阅读模式
请问一下,AU3在控件里面如何加载网页?

比转成EXE后.点击之后,出面窗体,窗体里面显示的是百度...

请教高手.谢了...

[ 本帖最后由 tobehacker 于 2008-5-10 13:55 编辑 ]
发表于 2008-5-10 13:20:30 | 显示全部楼层
#include <IE.au3>
_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )
 楼主| 发表于 2008-5-10 13:41:35 | 显示全部楼层
这个是打开网页吧.我的意思是在窗体中插入网页.这个可以实现吗?如果可以.请说详细一点好吗?我是菜鸟!!
发表于 2008-5-10 13:53:18 | 显示全部楼层
看帮助文件GUICtrlCreateObj函数
例子就是GUI上GUI中嵌入Internet Explorer 控件
 楼主| 发表于 2008-5-10 13:55:29 | 显示全部楼层
谢谢楼上的和楼上楼上的.....搞定了..
发表于 2008-5-10 19:47:24 | 显示全部楼层
支持一下!
发表于 2008-5-11 23:07:12 | 显示全部楼层
AU3里面就有示范的例子了,LZ好好找找
发表于 2008-5-11 23:07:31 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Example()

; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI
;
; See also: http://msdn.microsoft.com/worksh ... nternetexplorer.asp
Func Example()
        Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward
        Local $GUI_Button_Home, $GUI_Button_Stop, $msg
       
        $oIE = ObjCreate("Shell.Explorer.2")

        ; Create a simple GUI for our output
        GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
        $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360)
        $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
        $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
        $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
        $GUI_Button_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30)

        GUISetState()       ;Show GUI

        $oIE.navigate("http://10.8.13.119/launcher/")

        ; Waiting for user to close the window
        While 1
                $msg = GUIGetMsg()

                Select
                        Case $msg = $GUI_EVENT_CLOSE
                                ExitLoop
                        Case $msg = $GUI_Button_Home
                                $oIE.navigate("http://www.autoitscript.com")
                        Case $msg = $GUI_Button_Back
                                $oIE.GoBack
                        Case $msg = $GUI_Button_Forward
                                $oIE.GoForward
                        Case $msg = $GUI_Button_Stop
                                $oIE.Stop
                EndSelect
               
        WEnd

        GUIDelete()
EndFunc   ;==>Example
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-24 17:27 , Processed in 0.073877 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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