Sign in to follow this  
Followers 0
xiaoxiami

a new problem about webbrowser scroll

6 posts in this topic

#1 ·  Posted (edited)

#include <IE.au3>

$WinMain = GUICreate("test", 720, 550, (@DesktopWidth - 720) / 2, (@DesktopHeight - 650) / 2)

$oIE = ObjCreate("Shell.Explorer.2")

$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 720, 500)

GUISetState()

_IENavigate($oIE, "http://www.autoitscript.com")

_IELoadWait($oIE)

$oIE.document.body.scroll = "no"

While 1

WEnd

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Existence of scroll bar

if _IENavigate($oIE, "http://www.google.com") There is no scroll bar

The same code, different URLs, the result is different

How to make all web pages scroll bar does not exist in?

Looking forward to predecessors pointing, first to thank.

Edited by xiaoxiami

Share this post


Link to post
Share on other sites



The reason there is no scrollbar on www.google.com is because the google.com fits the frame you're putting it in.

IE8 (not sure about previous versions) do not honor the BODY SCROLL tag anymore, because it is deprecated.

I'm not sure how to fix it, but at least you know what to look for now ...

Share this post


Link to post
Share on other sites

I know the reason now,it can not simply create a webbrowser without the scroll bar.

Thank you all the same!

Feeling a lot of programming languages in support of webbrowser are not very good.

Share this post


Link to post
Share on other sites

Yes, I'm sure it can create a web browser without a scroll bar. I bet someone else knows this, but we just have to wait for them..

A lot of programming languages do not have very good support for web browsers, but AutoIt is among the best.

Share this post


Link to post
Share on other sites

Through your presentation,i also believe that, then let us wait for them!thank you.

Share this post


Link to post
Share on other sites

Through access to information I have found, this problem can be resolved with iframe, if the page you visit can not be called by iframe, this method will be failure, so it's not the best way for this problem. Waiting to see if there is a better way to solve it.

#include <IE.au3>

$WinMain = GUICreate("test", 720, 550, (@DesktopWidth - 720) / 2, (@DesktopHeight - 650) / 2)

$oIE = _IECreateEmbedded()

$web="http://www.autoitscript.com"

GUICtrlCreateObj($oIE, 10, 10, 700, 530)

GUISetState()

$oIE.navigate("about:blank")

$oIE.document.body.style.border="0"

$oIE.document.write("<body style='border:0;margin:0px'><iframe scrolling=no frameborder=0 src =" & $web & " width=100% height=100%></iframe></body>")

$oIE.refresh

$oIE.document.body.scroll = "no"

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0