muhmuuh Posted December 5, 2010 Posted December 5, 2010 Hello! I've got a question - is there a way to disable the vertical and horizontal scrollbars in an IE window? With the _IEPropertySet functoin I can disable the addressbar, the toolbar, the menubar but I didn't find a way to disable the scrollbars. Any ideas? Many thanks I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
muhmuuh Posted December 5, 2010 Author Posted December 5, 2010 I'm soory. My first search was bad. I found what I needed - $ie.document.body.scroll = "no"Many thanks to DaleHohm! (once again) I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
muhmuuh Posted December 5, 2010 Author Posted December 5, 2010 (edited) hmm... It seems it doesn't work This is my program and the scrollbars are still active $ie=_IECreate('www.google.com', 0, 1, 0) _IEPropertySet($ie, "width", 400) _IEPropertySet($ie, "height", 350) _IEPropertySet($ie, "addressbar", False) _IEPropertySet($ie, "menubar", False) _IEPropertySet($ie, "statusbar", False) _IEPropertySet($ie, "toolbar", False) _IEPropertySet($ie, "resizable", False) _IELoadWait($ie) $ie.document.body.scroll = "no" Any ideas? Edited December 6, 2010 by muhmuuh I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
DaleHohm Posted December 6, 2010 Posted December 6, 2010 They are from the document style $ie.document.body.scroll = "no" $ie.document.body.style.overflow = "hidden" 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
muhmuuh Posted December 6, 2010 Author Posted December 6, 2010 (edited) Strange thing... With this code it works (the scrollbars disapper) #include <Ie.au3> $ie=_IECreate('www.yahoo.com', 0, 1, 0) _IEPropertySet($ie, "width", 400) _IEPropertySet($ie, "height", 350) _IEPropertySet($ie, "addressbar", False) _IEPropertySet($ie, "menubar", False) _IEPropertySet($ie, "statusbar", False) _IEPropertySet($ie, "toolbar", False) _IEPropertySet($ie, "resizable", False) _IELoadWait($ie) $ie.document.body.scroll = "NO" $ie.document.body.style.overflow = "hidden" but with this one it doesn't (the scrollbars are still active) #include <Ie.au3> $ie=_IECreate('www.google.com', 0, 1, 0) _IEPropertySet($ie, "width", 400) _IEPropertySet($ie, "height", 350) _IEPropertySet($ie, "addressbar", False) _IEPropertySet($ie, "menubar", False) _IEPropertySet($ie, "statusbar", False) _IEPropertySet($ie, "toolbar", False) _IEPropertySet($ie, "resizable", False) _IELoadWait($ie) $ie.document.body.scroll = "NO" $ie.document.body.style.overflow = "hidden" As you can see the only change is in the url (which I thought was not important in this situation). I can't find a reason why it works with yahoo.com and it doesn't with google.com Edit: After some more testing I found out that it works for some sites and for some it doesn't and I can't find any relation Than in the IE documentation I found that SCROLL=NO does-not prevent window-zoom-level (statusbar lower right) from putting-on horizontal scrollbars .... (e.g. zoomed-in HD-narrowed pages scrollbar horizontally into colorspace at-whim). The yahoo page is long and by default it has scrollbars, the google page is short and gets scrollbars only when the window is resized (like in my program). Is this why .scroll = "NO" works with yahoo and not with google? It sounds very weird to me... I hope that you can understand the problem from my explanation. Many thanks in advance Edited December 6, 2010 by muhmuuh I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
DaleHohm Posted December 6, 2010 Posted December 6, 2010 It works for me on google. I'm using IE8, you? 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
muhmuuh Posted December 6, 2010 Author Posted December 6, 2010 IE7 As I said it works on some sites and it doesn't on others... What's the logic? I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
tkminh Posted December 6, 2010 Posted December 6, 2010 IE7As I said it works on some sites and it doesn't on others... What's the logic?I try with IE8, and it work. I think the problem is your IE7 Visit my blogMua bán ô tô, xe hơi, tuyển dụng việc làm
DaleHohm Posted December 6, 2010 Posted December 6, 2010 I'm afraid it is a bug in IE7... google IE7 overflow hidden and you will find a lot of matches... search and you may find a workaround. 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
IanN1990 Posted September 29, 2011 Posted September 29, 2011 Heya, i tryed out this code and it works perfectly apart from as soon as i load a new page or click a link the scrollbars come back ? Is this normal or do i need to put in some loop code or a condiction to stop this from happening
happytc Posted September 29, 2011 Posted September 29, 2011 Hello! I've got a question - is there a way to disable the vertical and horizontal scrollbars in an IE window? With the _IEPropertySet functoin I can disable the addressbar, the toolbar, the menubar but I didn't find a way to disable the scrollbars. Any ideas? Many thanks #include <IE.au3> $oIE = _IECreateEmbedded() $hGui = GUICreate('Test',800,600) GUICtrlCreateObj($oIE,0,0,800,600) _IENavigate($oIE,"http://www.autoitscript.com/forum/forum/2-general-help-and-support/") GUISetState(@SW_SHOW, $hGui) _HideScroll($oIE) Do Until Sleep(10) * GUIGetMsg()==-3 Func _HideScroll($Temp_Object) Local $hText = 'var temp_h1 = document.body.clientHeight;'& _ 'var temp_h2 = document.documentElement.clientHeight;'& _ 'var isXhtml = (temp_h2<=temp_h1&&temp_h2!=0)?true:false;'& _ 'var htmlbody = isXhtml?document.documentElement:document.body;'& _ 'htmlbody.style.overflow = "hidden";' $Temp_Object.document.parentwindow.execscript($hText,"javascript") EndFunc
IanN1990 Posted October 1, 2011 Posted October 1, 2011 #include $ie=_IECreate('http://www.bbc.co.uk/iplayer/', 0, 1, 0) _IELoadWait($ie) GUISetState() Do $ie.document.body.scroll = "NO" $ie.document.body.style.overflow = "hidden" Until GUIGetMsg() = 1 Its far from perfect "i am new here" but is there any way i could put a loop that ends when IE is closed
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