queensoft Posted November 15, 2011 Share Posted November 15, 2011 (edited) Later edit: wrong title, I used to have _IEBodyReadHTML, but it's the same thing. ;First run - program works perfectly, it displays all image links. ;Second run - program will load a javascript link. Page will load OK, images are changed. But, image links are not displayed, I get ----> $IEComErrorWinDescription = Variable is not of type 'Object'. And, here comes the kicker: if I manually click the "Next >" button (manually load the javascript link), the images from page 2 are displayed corectly. How to test this: enable (un-comment) ;Sleep(5000) While program is sleeping 5 seconds, scroll down and click "Next >" button under the images. Program will display the images from page 2 perfectly, will reload page 2 (you change (02); to (03); ), now there's error. And, the big problem, if you load the link in a regular browser, click Next, then View Source - it will display images from page 1, not from the current page! #include <WindowsConstants.au3> #include <IE.au3> _IELoadWaitTimeout (3000) _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("PROGRAM", 1200, 930, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 90, 1180, 800) GUISetState() ;first run _IENavigate ($oIE, "http://www.supergoodmovies.com/9062/tollywood/Ritu-Barmecha-Actress-Gallery") ;Sleep(5000) $oLinks = _IEImgGetCollection ($oIE) For $oLink In $oLinks ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $oLinks = ' & $oLink.src & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console Next ;second run $oIE = _IENavigate ($oIE, 'javascript:LoadGalleryInnerListPartial(02);') $oLinks = _IEImgGetCollection ($oIE) For $oLink In $oLinks ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $oLinks = ' & $oLink.src & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console Next Edited November 15, 2011 by queensoft Link to comment Share on other sites More sharing options...
queensoft Posted November 17, 2011 Author Share Posted November 17, 2011 Anyone ? Link to comment Share on other sites More sharing options...
DaleHohm Posted December 1, 2011 Share Posted December 1, 2011 Try adding _IELoadWait($oIE) prior to your _IELinkGetCollection call. 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...
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