Kaba Posted October 9, 2011 Share Posted October 9, 2011 Hi, I use the following code to view a HTML file :#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> $file = @ScriptDir &"\test.html" $obj = ObjCreate("shell.Explorer.2") $GUI = GUICreate("GUI", 300, 200, 100, 100) GUICtrlCreateObj($obj,10, 10,280,150) $obj.navigate($file) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd This is the very basic HTML file I view with it: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head> <meta content="text/html; charset=ISO-8859-1"http-equiv="content-type"> <title>Test</title></head><body>Test</body></html> The thing that annoys me is that the window always shows an inactive scrollbar on the right side. Is there a way to remove the inactive scroll bar from the right side? Kaba Link to comment Share on other sites More sharing options...
Kaba Posted October 13, 2011 Author Share Posted October 13, 2011 Just trying hard to find an answer to that question. Does anyone know if the side scroll bar can be removed or if this is property just can't be changed with autoit? If I knew that it simply isn't possible, this would help me as well. Kaba Link to comment Share on other sites More sharing options...
hannes08 Posted October 13, 2011 Share Posted October 13, 2011 $obj.document.body.scroll = "no" Untested. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Kaba Posted October 13, 2011 Author Share Posted October 13, 2011 Hi Hannes, thank you for your help. I added it to the code. But, unfortunatly this doesn't remove the inactive side scrollbar. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> $file = @ScriptDir &"\test.html" $obj = ObjCreate("shell.Explorer.2") $GUI = GUICreate("GUI", 300, 200, 100, 100) GUICtrlCreateObj($obj,10, 10,280,150) $obj.navigate($file) $obj.document.body.scroll = "no" GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd The thing I find strange is that I found where JohnOne had the same problem but with the vertical scrollbar.But, no Horizontal right side bar is shown in his example. Here's his code:#include <IE.au3> $hGui = GUICreate("",400,600,100,50) $Obj = ObjCreate("Shell.Explorer.2") $CtrlObj = GUICtrlCreateObj($Obj,5,5,350,590) GUISetState() ;$Obj.Navigate2("http://www.google.com") _IENavigate($Obj, "www.google.com") _IELoadWait($Obj) $Obj.document.body.scroll = "no" Sleep(10000) He worked with '_IENavigate' instead of '$obj.navigate($file)' and I thought that this could be the solution.But it isn't. I tried his code with my sample HTML file.And the result is the same: no horizontal scroll bar but the one at the vertical right side. Strange. Link to comment Share on other sites More sharing options...
Kaba Posted October 17, 2011 Author Share Posted October 17, 2011 Just trying to keep this post active. Does really have an idea how to prevent the autoit webbrowser from showing scrollbars without using $obj.document.body.scroll = "no" Because this doesn't seem to work in my example. Or am I using it wrong? Kaba Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 17, 2011 Share Posted October 17, 2011 (edited) Can you edit the html file? Then you can add "SCROLL=NO" in the body tag to remove the scrollbars http://www.htmlcodetutorial.com/document/_BODY_SCROLL.html Edited October 17, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Kaba Posted October 18, 2011 Author Share Posted October 18, 2011 Yipiiii, thank you Admiral Alkex!!!!! This is the answer. Yes I can edit the shown html files. I had tried to do that with the css overflow property but this didn't work. The "SCROLL=NO" tag is the solution to my problem. Thank you very much! Kaba Link to comment Share on other sites More sharing options...
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