|
发表于 2018-7-22 17:20:40
|
显示全部楼层
[mw_shl_code=aauto,true]#Region ;**** 由 AccAu3Wrapper_GUI 创建指令 ****
#AccAu3Wrapper_OutFile=TEST.exe
#AccAu3Wrapper_OutFile_x64=TEST_x64.exe
#AccAu3Wrapper_Compile_both=Y
#AccAu3Wrapper_Res_Language=2052
#AccAu3Wrapper_Res_requestedExecutionLevel=None
#EndRegion ;**** 由 AccAu3Wrapper_GUI 创建指令 ****
#include <ie.au3>
Global $Url = "https://zhidao.baidu.com/"
Global $BackURL
Global $login_IE = _IECreateEmbedded ()
Global $login_gui = GUICreate("内嵌IE不弹出新窗口" , 930, 565)
Global $login_GUIActiveX = GUICtrlCreateObj($login_IE, 10, 10, 910, 440)
Global $Btn_Back = GUICtrlCreateButton("返回跳转前页面", 120, 480, 100, 70)
Global $Buttonx = GUICtrlCreateButton("退出", 650, 480, 100, 70)
$EventObject2 = ObjEvent($login_IE, "IEEvent_", "DWebBrowserEvents2") ;注册获取 IE对象产生的事件,有事件则调用后面的相关函数
GUISetState()
login()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
$EventObject2 = 0
Exit
Case $Buttonx
$EventObject2 = 0
Exit
Case $Btn_Back
$login_IE.Navigate($BackURL)
EndSwitch
WEnd
Volatile Func IEEvent_NewWindow3($ppDisp, ByRef $Cancel, $dwFlags, $bstrUrlContext, $bstrUrl)
$BackURL = $bstrUrlContext
$Cancel = True
$login_IE.Navigate( $bstrUrl )
EndFunc
Func login()
$login_IE.Navigate($Url)
EndFunc
[/mw_shl_code]
Au3版本3.3.14.2 |
|