Libre Posted March 24, 2006 Posted March 24, 2006 (edited) anyone knows how to open an activex window with ie object without scroll bars ? thanks. i tryed this. but doesnt works. #include <Constants.au3> #include <GuiConstants.au3> GuiCreate("hi, i want to make a banner without scrollbars", 480, 450,-1, -1 ,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj($oIE, 10, 380, 460,60) $oIE.navigate("http://www.terra.es") $oIE.document.body.scroll = "no" $oIE = 0 GuiSetState() while 1 Sleep(50) $msg = GuiGetMsg() if $msg == $GUI_EVENT_CLOSE Then ExitLoop wendbanner.au3 Edited March 24, 2006 by Libre I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!?
Lapo Posted March 25, 2006 Posted March 25, 2006 (edited) http://www.codecomments.com/message169781.html#include <GUIConstants.au3>#include <IE.au3>GUICreate ( "",450, 300)GUISetBkColor(0x0000FF)$not = GUICtrlCreateButton("&IE Active X", 10, 30, 100)GUISetState () While 1$msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ; MsgBox(0, "", "Dialog was closed") ExitCase $msg = $not$oIE = ObjCreate("Shell.Explorer.2")$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 560,270)GUICtrlSetStyle($GUIActiveX, $WS_VISIBLE)$oIE.navigate("www.google.it")While _IEGetProperty($oIE, "busy") Sleep(100) WEnd Sleep(500)$oIE.document.write <"body Scroll=no"> $oIE = 0 EndSelectWEnd Edited March 25, 2006 by Lapo
DaleHohm Posted March 25, 2006 Posted March 25, 2006 Instead of: $oIE.document.write <"body Scroll=no"> I'd recommend: $oIE.document.body.scroll = "no" 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
Libre Posted March 25, 2006 Author Posted March 25, 2006 Instead of: $oIE.document.write <"body Scroll=no"> I'd recommend: $oIE.document.body.scroll = "no" DaleThanks for the anwers, but : $oIE.document.write <"body Scroll=no"> = SyntaX error $oIE.document.body.scroll = "no" = doesnt works. i used this last one in my first script in the top and doesnt works, too. and, other question, where i can found the command list for an IE object ? like, document.write or body.scroll ? I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!?
DaleHohm Posted March 25, 2006 Posted March 25, 2006 Thanks for the anwers, but : $oIE.document.write <"body Scroll=no"> = SyntaX error $oIE.document.body.scroll = "no" = doesnt works. i used this last one in my first script in the top and doesnt works, too. and, other question, where i can found the command list for an IE object ? like, document.write or body.scroll ?Oh, boy. This opens a can of worms I was unaware of. I think you'll find that the $oIE.document.body.scroll = "no" will work when you navigate to some pages and not to others. E.g. www.yahoo.com works, www.autoitscript.com does not This is because www.autoitscript.com (and your page) sets a "!DOCTYPE" attribute that changes the object model. You see something like the following at the top of these pages: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> This can be used to see what mode the page is in: ConsoleWrite($oIE.document.compatMode & @CR) It will be either be "BackCompat" (by default) or "CSS1Compat" for the pages with the special !DOCTYPE designation. References that I have found state that things migrate from "body" to "documentElement" as the root carrying these attributes which leads me to believe that the following should work (but it does NOT): $oIE.document.documentElement.scroll = "no" I have not found a solution, sorry. Dale p.s. Regarding where to look for information: InternetExplorer Object: http://msdn.microsoft.com/library/default....netexplorer.asp Document Object http://msdn.microsoft.com/library/default....bj_document.asp 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
GaryFrost Posted March 25, 2006 Posted March 25, 2006 (edited) From what I can tell that doesn't get rid of the scroll bars but disables them, but you can't apply that until the page is done loading. Works the same with autoitscript.com also. #include <Constants.au3> #include <GuiConstants.au3> #include <IE.au3> GUICreate("hi, i want to make a banner without scrollbars", 480, 450, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetState() $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj($oIE, 10, 380, 460, 60) GUICtrlSetStyle($GUIActiveX, $WS_VISIBLE) $oIE.navigate ("http://www.terra.es") While _IEGetProperty ($oIE, "busy") Sleep(100) WEnd $oIE.document.write.body.Scroll = "no" While 1 Sleep(50) $msg = GUIGetMsg() If $msg == $GUI_EVENT_CLOSE Then ExitLoop WEnd $oIE = 0 Edited March 25, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Libre Posted March 25, 2006 Author Posted March 25, 2006 thank you. Dale, and gafrost, for the anwers. I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!?
DaleHohm Posted March 25, 2006 Posted March 25, 2006 From what I can tell that doesn't get rid of the scroll bars but disables them, but you can't apply that until the page is done loading. Works the same with autoitscript.com also.Thanks Gary. You prompted me to go back and test again. Although I spent quite a bit of time on my last post it was all a wild goose chase. You are correct that the key is that the document must be completely loaded before the property can be set. In fact if I get rid of the small mistake in your example it works as expected (take out the .write)... the scrollbars disappear: #include <Constants.au3> #include <GuiConstants.au3> #include <IE.au3> GUICreate("hi, i want to make a banner without scrollbars", 480, 450, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetState() $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj($oIE, 10, 380, 460, 60) GUICtrlSetStyle($GUIActiveX, $WS_VISIBLE) $oIE.navigate ("http://www.terra.es") While _IEGetProperty ($oIE, "busy") Sleep(100) WEnd $oIE.document.body.scroll = "no" While 1 Sleep(50) $msg = GUIGetMsg() If $msg == $GUI_EVENT_CLOSE Then ExitLoop WEnd $oIE = 0 Dale p.s. I tested with the beta version of _IELoadWait that is posted in the IE.au3 thread and if you use that code along with (_IENavigate instead of $oIE.navigate) it works without the While loop checking the busy status 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
GaryFrost Posted March 26, 2006 Posted March 26, 2006 In fact if I get rid of the small mistake in your example it works as expected (take out the .write)... the scrollbars disappear:Just started messing around with the IE stuff, hadn't had much use for it till as of late, takes me a bit but I'll get it.Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
DaleHohm Posted December 21, 2006 Posted December 21, 2006 Here is an updated example using the features of a more recent IE.au3 (V2.1-0 in AutoIt V3.2.2.0 RC1) #include <GuiConstants.au3> #include <IE.au3> GUICreate("hi, i want to make a banner without scrollbars", 480, 450, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetState() $oIE = _IECreateEmbedded() $GUIActiveX = GUICtrlCreateObj($oIE, 10, 335, 460, 105) GUICtrlSetStyle($GUIActiveX, $WS_VISIBLE) _IENavigate($oIE, "http://www.autoitscript.com") $oIE.document.body.scroll = "no" While 1 Sleep(50) $msg = GUIGetMsg() If $msg == $GUI_EVENT_CLOSE Then ExitLoop WEnd 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
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