找回密码
 加入
搜索
查看: 7787|回复: 13

[IE类操作] [已解决]请问怎么让_IECreateEmbedded使用新IE版本,而不是老版本或IE6兼容模式[gui]

[复制链接]
发表于 2013-9-13 19:14:01 | 显示全部楼层 |阅读模式
本帖最后由 MaGiCmAn 于 2013-9-13 21:31 编辑
$sURL="http://alphatown.com/"
Local $hWnd = GUICreate($sURL, 1280,  800, -1, -1)
Local $oIE  = _IECreateEmbedded()
$GUIActiveX = GUICtrlCreateObj($oIE,-1, -1, 1280, 800)
_IENavigate($oIE, $sURL)
GUISetState()
GUI里面打开是这个样子的(应该是ie6或者兼容模式)

浏览器打开则是这个样子(IE8)

我在帮助文档、论坛、百度、谷歌搜索过都不得其所,不知道是不是关键字选得不好(autoit IE IE6 版本 兼容性 _IECreateEmbedded……等等各种组合各种搜)
请教高手们:怎么样才能在GUI中用我的浏览器真实版本(IE8)打开呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2013-9-13 21:27:58 | 显示全部楼层
找到答案了
http://www.autoitscript.com/foru ... please-help-thanks/


Feature Delegation via Registry Hacks

Fortunately starting with Internet Explore 8 and later there’s a fix for this problem via a registry setting. You can specify a registry key to specify which rendering mode and version of IE should be used by that application. These are not global mind you – they have to be enabled for each application individually.
There are two different sets of keys for 32 bit and 64 bit applications.
32 bit:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION
Value Key: yourapplication.exe

64 bit:

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION
Value Key: yourapplication.exe

The value to set this key to is (taken from MSDN here) as decimal values:
9999 (0x270F)
Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.
9000 (0x2328)
Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.
8888 (0x22B8)
Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.
8000 (0x1F40)
Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.
7000 (0x1B58)
Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.
 楼主| 发表于 2013-9-13 21:30:42 | 显示全部楼层
就是写个注册表,强制IE嵌入使用某个版本的IE
譬如
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION","xxx.exe","REG_DWORD","8888")
xxx.exe是你的程序名,8888表示强制使用ie8
发表于 2013-9-14 05:59:47 | 显示全部楼层
- -#有这种事情
留个记号
要改注册表还是比较麻烦的样子
发表于 2013-9-15 12:02:56 | 显示全部楼层
这论坛90%的问题都是自行解决的,很少有人帮忙,呵呵,这又一个。
 楼主| 发表于 2013-9-15 22:15:15 | 显示全部楼层
回复 5# zhybxyz

对我来说是100%。
不过我情愿相信这是由于我的问题太低阶,并且没有善用搜索(哪怕是在谷歌上搜索英文资料)就发表而造成的。
发表于 2013-11-29 00:03:47 | 显示全部楼层
标记   学习
发表于 2014-10-30 09:10:20 | 显示全部楼层
学习下,非常感谢,非常感谢
发表于 2016-3-14 19:14:30 | 显示全部楼层
标记一下  今天用到了  感谢楼主
发表于 2016-7-22 02:36:41 | 显示全部楼层
留个记号
非常有用
发表于 2016-8-21 20:39:18 | 显示全部楼层
今天用到了  感谢楼主
发表于 2016-8-29 08:36:17 | 显示全部楼层
留个记号,备用。
发表于 2016-9-1 16:16:55 | 显示全部楼层
同样标记一下                  备用
发表于 2017-1-23 22:11:49 | 显示全部楼层
学习了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-28 18:49 , Processed in 0.086074 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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