#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister()
$MTV = _IECreateEmbedded()
Dim $text = "", $Dir = ""
Dim $message = "请选择视频文件"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("au3加载wmplayer例子", @DesktopWidth - 100, @DesktopHeight - 100, -1, -1)
$GUIActive = GUICtrlCreateObj($MTV, 0, 0, 1600, 1280)
_AddMyIEVersion(1)
_IENavigate($MTV, @ScriptDir & "\K线1.html")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _AddMyIEVersion($tag = 1)
Local $script = @ScriptName
If Not @Compiled Then
If $tag = 1 Then
RegWrite('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3.exe', 'REG_DWORD', '9000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3.exe', 'REG_DWORD', '9000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3.exe', 'REG_DWORD', '9000')
RegWrite('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3_x64.exe', 'REG_DWORD', '9000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3_x64.exe', 'REG_DWORD', '9000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3_x64.exe', 'REG_DWORD', '9000')
Else
RegDelete('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3.exe')
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3.exe')
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3.exe')
RegDelete('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3_x64.exe')
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3_x64.exe')
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', 'AutoIt3_x64.exe')
EndIf
Else
If $tag = 1 Then
RegWrite('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', $script, 'REG_DWORD', '11000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', $script, 'REG_DWORD', '11000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', $script, 'REG_DWORD', '11000')
Else
RegDelete('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', $script)
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', $script)
RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION', $script)
EndIf
EndIf
EndFunc ;==>_AddMyIEVersion