JohnOne Posted November 9, 2010 Posted November 9, 2010 (edited) Recieving this error from my code.IE.au3 V2.4-0 Error from function _IEDocInsertHTML, $_IEStatus_InvalidObjectType (Expected document element)Im really quite noob with IE som Im not sure how to get a document element to use.My goal is to get shut of the IE object scrollbars.And I got the idea from #include <GUIConstantsEx.au3> #include <IE.au3> $hGUI = GUICreate("",762,574) Global $oIE = _IECreateEmbedded() Global $hIE = GUICtrlCreateObj($oIE, 10, 10, 742, 554) _IENavigate ($oIE, "http://www.yahoo.com") $oDoc = _IEDocGetObj ($oIE) _IEDocInsertHTML($oDoc, '<style type="text/css">BODY {overflow: hidden;}</style>') GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndAnyone have any tips?$oIE.document.Body.Scroll = 'no' does not work. Edited November 9, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
KaFu Posted November 9, 2010 Posted November 9, 2010 Strange, $oIE.document.body.scroll = "no" works fine for me (IE 7). #include <GUIConstantsEx.au3> #include <IE.au3> $hGUI = GUICreate("", 762, 574) Global $oIE = _IECreateEmbedded() Global $hIE = GUICtrlCreateObj($oIE, 10, 10, 742, 554) _IENavigate($oIE, "http://www.yahoo.com") $oIE.document.body.scroll = "no" $oIE.document.body.style.border = "0px" GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Juvigy Posted November 9, 2010 Posted November 9, 2010 Try with a normal IE window. Also check this example: #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com") $oBody = _IETagNameGetCollection($oIE, "body", 0) _IEDocInsertHTML($oBody, "<h2>This HTML is inserted After Begin</h2>", "afterbegin") _IEDocInsertHTML($oBody, "<h2>This HTML is inserted Before End</h2>", "beforeend")
JohnOne Posted November 9, 2010 Author Posted November 9, 2010 (edited) Thanks guys. I was unaware of $oIE.document.body.style.border = "0px" which when added, gave the desired effect. And the _IEDocInsertHTML() example works fine too, was most likely the html I was trying to insert. Thanks for your time and help. Edited November 9, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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