include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example()
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("測試瀏覽-框架", 600, 400, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 300)
$GUI_Button_Back = GUICtrlCreateButton("網絡路徑", 10, 360, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("本地路徑", 230, 360, 100, 30)
GUISetState() ;Show GUI
$oIE.navigate(//192.168.1.118/autotest) ;;;;如果是網絡路徑則出現安全提示
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_Home
$oIE.navigate("d:") ;;;本地路徑運行任何東西一切正常,無任何提示
Case $msg = $GUI_Button_Back
$oIE.navigate(//192.168.1.118/autotest) ;;;;如果是網絡路徑則出現安全提示
EndSelect
WEnd
GUIDelete()
EndFunc ;==>Example