burger Posted February 22, 2008 Share Posted February 22, 2008 I am embedding IE in a GUI with ObjCreate. Is there any way to make it automatically scroll down a page a certain amount after it loads($obj.navigate)? Here is an example of my problem. #include <GUIConstants.au3> GUICreate("Example", 600, 400) $input = GUICtrlCreateInput("", 55, 330, 410) $go = GUICtrlCreateButton("Go", 470, 328, 50) $obj = ObjCreate("Shell.Explorer.2") $embed = GUICtrlCreateObj($obj, 20, 20, 500, 227) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $go Then $obj.navigate("http://www.autoitscript.com/") ;_GUICtrlEdit_Scroll($obj, $SB_PAGEDOWN) EndIf If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd As you can see, the _GUICtrlEdit_Scroll command did not work for me. If you know how to scroll down to a certain image or object on the page that would be even better! Thank you for your help. Burger Link to comment Share on other sites More sharing options...
DaleHohm Posted February 22, 2008 Share Posted February 22, 2008 If you are trying to get a particular object into the display, say $oImg use: $oImg.scrollIntoView() 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 Link to comment Share on other sites More sharing options...
burger Posted February 22, 2008 Author Share Posted February 22, 2008 If you are trying to get a particular object into the display, say $oImg use:$oImg.scrollIntoView()DaleThank you Dale 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