Olsm Posted October 14, 2012 Posted October 14, 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 October 14, 2012 by Olsm
DaleHohm Posted October 15, 2012 Posted October 15, 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, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe 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
Olsm Posted October 17, 2012 Author Posted October 17, 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:
DaleHohm Posted October 19, 2012 Posted October 19, 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, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe 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
chrshea Posted October 24, 2012 Posted October 24, 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" >
Altiy Posted September 2, 2013 Posted September 2, 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?
lionfaggot Posted November 25, 2013 Posted November 25, 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 November 25, 2013 by lionfaggot
LionH Posted November 15, 2014 Posted November 15, 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 Lion1985 1
Golbez Posted November 22, 2014 Posted November 22, 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) bikerbrooks 1
bikerbrooks Posted November 29, 2015 Posted November 29, 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 November 29, 2015 by bikerbrooks added to it mLipok 1
mLipok Posted November 29, 2015 Posted November 29, 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 November 29, 2015 by mLipok bikerbrooks 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler 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 * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * 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 * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * 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 * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "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, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
AlienStar Posted September 3, 2020 Posted September 3, 2020 On 10/17/2012 at 11:12 PM, Olsm said: 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-Version I 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 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. The added key looks something like this in the Registry Editor: I have win 7 x64 bit what is the value which I have to set (DWORD or QWORD) ??
Nine Posted September 3, 2020 Posted September 3, 2020 DWORD. Got also W7x64 and it's working fine... AlienStar 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
Unical Posted October 18, 2021 Posted October 18, 2021 Hello, I Have Edge 94 on Windows 10 (64bit) But when I use application for website screenshot, it uses old browser: IE11 on Windows 8. I try to change registry HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION DWORD: application.exe 11001 (0x2AF9) and other variants, but unsuccessfully. Anyone can help me?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now