#1 · Posted 14 Oct 2012 (edited) Hi.1: Why does _IECreateEmbedded() embed internet explorer version 7 when 9 is installed?2: I know how to check ie version with _IEGet() and prompt to update if version is older than 9, but how can I force _IECreateEmbedded() to use internet explorer 9 and how can I check correct version is embedded?I use _IECreateEmbedded() function to embed internet explorer to my gui.The website I want to browse requires internet explorer 9 and I get error message that browser is too old, because ie 7 is embedded even though ie 9 is installed/updated.And even though internet explorer 9 is installed, _IECreateEmbedded() may embed an earlier version of internet explorer, in my case internet explorer 7.At first it only happened on my computer at work, so I updated to ie9 and it still would embed ie7. My home computer embedded ie9.My computer at work have started embedding the correct version after a while and I dont know what fixed it.Then after I reinstalled my home computer with an installation disc that included service pack 1, internet explorer 9 was built in so I didnt have to update and autoit embeds ie7.Can someone please help me solve this?I have asked for help before, but nobody responded.This project is very important to me, I would be very grateful if someone has a solution to this, or atleast will try to help.Thanks in advance!Below are two pictures to demonstrate whats wrong, they are both taken today on my home computer that has Windows 7 Ultimate 64-bit installed.First whatismybrowser.com in internet explorer 9:Then whatismybrowser.com in AutoIt using _IECreateEmbedded() : Edited 14 Oct 2012 by Olsm Share this post Link to post Share on other sites
#2 · Posted 15 Oct 2012 You'll have more success asking in an MSDN community forum. _IECreateEmbedded simply returns ObjCreate("Shell.Explorer.2"). You will see the same behavior with VBScript CreateObject and you can ask your questions there from the perspective of VBScript to take AutoIt out of the picture. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Share this post Link to post Share on other sites
#3 · Posted 17 Oct 2012 You'll have more success asking in an MSDN community forum. _IECreateEmbedded simply returns ObjCreate("Shell.Explorer.2"). You will see the same behavior with VBScript CreateObject and you can ask your questions there from the perspective of VBScript to take AutoIt out of the picture.DaleHey.Thanks allot for your reply!I started searching two days ago after getting your reply.I didnt know how to create a gui and embed ie in vbscript using createobject, so I searched around for tutorials.I also searched for shell.explorer.2 to find more information about it.Suddenly I came across this site while searching: http://go4answers.webhost4life.com/Example/shellexplorer-vs-internet-explorer-191462.aspxAnd I thought stupid me, of course its called internet explorer render/rendering version, not internet embedding version etc that I had been searching.I had been searching for days and I was trying to figure out how to solve this problem in many weeks. I was a little stuck in development of my browser, but I dont want to give up ever!Then I searched for 'internet explorer render specify version' and I found this website explaining the solution: http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-VersionI cannot thank you enough DaleHohm for helping me figure this out, I am so happy that I finally got this problem solved, and I am very close to initial release of both my browser project and website.I could create an UDF for setting the ie rendering version as a thank you back to you and this awesome community and scripting language that is AutoIt!The name of the UDF could be _IE_VersionSet OR _IE_RenderingVersion OR just _IE_Version. What name should I chose?I'll copy and poste the solution from the website I found below: Feature Delegation via Registry HacksFortunately 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_EMULATIONValue Key: yourapplication.exe64 bit:HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATIONValue Key: yourapplication.exeThe 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.The added key looks something like this in the Registry Editor: Share this post Link to post Share on other sites
#4 · Posted 19 Oct 2012 I'd suggest just creating a stand-alone UDF and post it here - then you get to choose the name :-) Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Share this post Link to post Share on other sites
#5 · Posted 24 Oct 2012 I had the same problem and this started me down the path to fixing it so thanks for the info. Here's a couple of other things that I found:1. If you aren't sure what rendering engine it is using, navigate to: www.whatsmyuseragent.com (in the web browser control) and it will tell you.2. If you control the HTML, then it may be simpler to use a META command in the HTML rather than change the registry. Insert the following command at the start of the <head> section:<meta http-equiv="X-UA-Compatible" content="IE=9" > Share this post Link to post Share on other sites
#6 · Posted 2 Sep 2013 Hi all, It is great solution with registry key. Hey. Thanks allot for your reply! I started searching two days ago after getting your reply. I didnt know how to create a gui and embed ie in vbscript using createobject, so I searched around for tutorials. I also searched for shell.explorer.2 to find more information about it. Suddenly I came across this site while searching: http://go4answers.webhost4life.com/Example/shellexplorer-vs-internet-explorer-191462.aspx And I thought stupid me, of course its called internet explorer render/rendering version, not internet embedding version etc that I had been searching. I had been searching for days and I was trying to figure out how to solve this problem in many weeks. I was a little stuck in development of my browser, but I dont want to give up ever! Then I searched for 'internet explorer render specify version' and I found this website explaining the solution: http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-VersionI cannot thank you enough DaleHohm for helping me figure this out, I am so happy that I finally got this problem solved, and I am very close to initial release of both my browser project and website.I could create an UDF for setting the ie rendering version as a thank you back to you and this awesome community and scripting language that is AutoIt!The name of the UDF could be _IE_VersionSet OR _IE_RenderingVersion OR just _IE_Version. What name should I chose?I'll copy and poste the solution from the website I found below:Feature Delegation via Registry HacksFortunately 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_EMULATIONValue Key: yourapplication.exe 64 bit: HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATIONValue 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.The added key looks something like this in the Registry Editor: Works fine. Just a stupid question - is it possible to define these values in manifest? Share this post Link to post Share on other sites
#7 · Posted 25 Nov 2013 (edited) my simple test sets the value in registry just fine however ie7 is still used, this is making me a bit mad now #include <IE.au3> #include <Process.au3> RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftInternet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", "0x2328") $mainwin = GUICreate("test", 700, 700) $OBJECT = ObjCreate("Shell.Explorer.2") $OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 700, 600) GUISetState() _IENavigate($object, "http://www.whatsmyuseragent.com/") While 1 Sleep(100) WEnd Edited 25 Nov 2013 by lionfaggot Share this post Link to post Share on other sites
#8 · Posted 15 Nov 2014 When you use this solution, the following will stop working: $oButton1 = _IEGetObjById($Obj, '_buttonId'); $oEvtButton1 = ObjEvent($oButton1, "clickedOnButton_"); Func clickedOnButton_onclick() MsgBox(0, "Yo", "Clicked on Button.") EndFunc Anyone know why that is? onClick listener stops working on IE8+ Thanks, Lion H 1 person likes this Share this post Link to post Share on other sites
#9 · Posted 22 Nov 2014 my simple test sets the value in registry just fine however ie7 is still used, this is making me a bit mad now #include <IE.au3> #include <Process.au3> RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftInternet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", "0x2328") $mainwin = GUICreate("test", 700, 700) $OBJECT = ObjCreate("Shell.Explorer.2") $OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 700, 600) GUISetState() _IENavigate($object, "http://www.whatsmyuseragent.com/") While 1 Sleep(100) WEnd hey there i figured the problem out i think Local $regValue = "0x2AF8" RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) 1 person likes this Share this post Link to post Share on other sites
#10 · Posted 29 Nov 2015 (edited) #include <IE.au3> #include <Process.au3> Local $regValue = "0x2AF8" RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) $mainwin = GUICreate("test", 700, 700) $OBJECT = ObjCreate("Shell.Explorer.2") $OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 700, 600) GUISetState() _IENavigate($object, "http://www.pinterest.com/") While 1 Sleep(100) WEndJust what i needed just took some digging Edited 29 Nov 2015 by bikerbrooks added to it 1 person likes this Share this post Link to post Share on other sites
#11 · Posted 29 Nov 2015 (edited) This is awesome news (EDIT: I do not know if I had ever walked on this topic, or at least certainly before him did not pay my attention.)Here is reference:https://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspxValueDescription11001 (0x2AF9Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.11000 (0x2AF8)IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11.10001 (0x2711)Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.10000 (0x02710)Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.9999 (0x270F)Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the declared !DOCTYPE directive. Failing todeclare a !DOCTYPE directive causes the page to load in Quirks.9000 (0x2328)Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. 8888 (0x22B8)Webpages are displayed in IE8 Standards mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.8000 (0x1F40)Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. 7000 (0x1B58)Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control. and here:http://dennymichael.net/2015/06/22/web-browser-control-specifying-the-ie-version/ Edited 29 Nov 2015 by mLipok 1 person likes this How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button: Spoiler Last update: 2016-01-09NEW: XMLWrapperEx.au3 - BETA Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * NEW: UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components * TeamViewer API -UDF * My contribution to others projects: * _sql.au3 UDF * SMTP Mailer UDF * _POP3_Ex.au3 UDF * RTF Printer - UDF * Useful links: * Forum etiquette * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * How to post code on the forum * UDF-Spec Questions "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer "Program are meant to be read by humans and only incidentally for computers and execute" Donald Knuth , be and \\//_. Share this post Link to post Share on other sites