找回密码
 加入
搜索
查看: 1864|回复: 5

怎么样在程序中嵌入主页代码

[复制链接]
发表于 2009-3-5 20:54:15 | 显示全部楼层 |阅读模式
如题:
怎么样在一个写好的程序源码中嵌入IE主页代码,知道的告诉下。。小弟感激不尽。。。。。。。。
发表于 2009-3-5 21:30:27 | 显示全部楼层

; *******************************************************
; Example 1 - Trap COM errors so that 'Back' and 'Forward' 
;               outside of history bounds does not abort script 
;               (expect COM errors to be sent to the console)
; *******************************************************
;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $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", 340, 420, 100, 30)

GUISetState()       ;Show GUI

_IENavigate ($oIE, "http://www.autoitscript.com")

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $GUI_Button_Home
            _IENavigate ($oIE, "http://www.autoitscript.com")
        Case $msg = $GUI_Button_Back
            _IEAction ($oIE, "back")
        Case $msg = $GUI_Button_Forward
            _IEAction ($oIE, "forward")
        Case $msg = $GUI_Button_Stop
            _IEAction ($oIE, "stop")
    EndSelect
WEnd

GUIDelete()

Exit

这个是嵌入ie框

要是我回答的不对 请回复 并且请把问题说明白 谢谢
发表于 2009-3-5 23:34:44 | 显示全部楼层
LZ应该是想直接在脚本中使用HTML代码~而不是调用IE打开html文件~
 楼主| 发表于 2009-3-8 23:27:15 | 显示全部楼层
2楼这个是嵌入ie框~!  。。。谢谢你的提供
但是我要的不是这个!
我是说更改IE主页的代码,就是通过AU3这个程序随意的更改IE主页。。而且可以锁定~~!
防止其他软件篡改~!!!!
发表于 2009-3-8 23:28:32 | 显示全部楼层
楼主的企图应该不是很好

不给做~
发表于 2009-3-9 09:17:51 | 显示全部楼层
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main"Default-Page-URL"
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main"Start Page"
HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel"Settings"=dword:1
HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel"Links"=dword:1
HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel"SecAddSites"=dword:1
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-12 07:50 , Processed in 0.086539 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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