VeeDub Posted April 27, 2008 Share Posted April 27, 2008 Hi, I am working with a form where there is only an image to click on to get to the next page. Here is the code: $oForms = _IEFormGetCollection ($oIE) ConsoleWrite("Forms Info - there are: " & $iNumForms & " forms on this page" & @CRLF) For $i = 0 to $iNumForms - 1 $oForm = _IEFormGetCollection ($oIE, $i) ConsoleWrite("Form Info: " & $oForm.name & @CRLF) $oLinks = _IELinkGetCollection($oForm) $iNumLinks = @extended ConsoleWrite("Link Info: " & $iNumLinks & " links found" & @CRLF) For $oLink In $oLinks ConsoleWrite("Link Info: " & $oLink.href & @CRLF) Next NextoÝ÷ Ø Ý¶¨ºÚnµÊxZ+Â'~az·î|Õú+Ê'¶¬¥¨æ"wèçËuë}.)ä"wèçÎ%y,~§t¸§ß£#jö¬r¸©· -øÓm×®y÷gºYwö&{u×9ë'ºY_j[ãRâB'~|«Ú±Êâ¦Þ|v¶*'ãMý·^¹çÝýéeßܨº°r§·u×9ë'ºY_j[ãRâB'~|«Ú±Êâ¦Þ|v¶*'ãMý·^¹çÝýéeßܨº´®øzÍý×^xç®tée}©l{Kyú9ò6¯jÇ+yñÚrب7öÝzçwö{¥e¢ .·u×9ë}çºY_j[ã_Ü¡×êç-¶#§¶Ú'$Éè¶X¬µçZnÞjwh¡jƧf zíêZë(!©¯(§Ú.±âæ"f x)brKhrXØ^f y8^~e£§×j)lj·½¨¥i¹^~º& æî«r^ëBËr In both cases the result is: --> IE.au3 V2.4-0 Warning from function _IEFormImageClick, $_IEStatus_NoMatch There are a number of images on the page and they all have /tang/bug.gifas their property - so trying to refer to that instead is not an option. Would appreciate suggestions on alternatives to try. Thanks Link to comment Share on other sites More sharing options...
DaleHohm Posted April 27, 2008 Share Posted April 27, 2008 _IEFormImageClick is intended for a very specific element type of <INPUT TYPE=IMAGE> THat is not what you have here. You'll want to use _IEImgClick instead. 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...
VeeDub Posted April 28, 2008 Author Share Posted April 28, 2008 Dale, Thanks for responding. Have tried $Status = _IEImgClick($oIE,"http://myaccount1.broadbandsolutions.com.au:7001/resources/smile/online_time_32.png","src") $Status = _IEImgClick($oIE,"online_time_32.png","name") Both result in the following --> IE.au3 V2.4-0 Warning from function _IEImgClick, $_IEStatus_NoMatch Have also had a look at the source code for the page, and it seems that the "link" to the next page is somehow generated dynamically on the fly - and it will not be possible (as a 'quick & dirty' workaround) to search the HTML and find the URL that I need. I will either need to figure out how to click on the image using IE.UDF or some ugly mouse-move/mouse-click approach VW Link to comment Share on other sites More sharing options...
DaleHohm Posted April 28, 2008 Share Posted April 28, 2008 (edited) Suggest you use DebugBar see my sig). It will quickly show you the source for the image even if it is dynamically generated. Dale p.s. Also be careful there are no frames and if so, see the _IEFrame* functions Edited April 28, 2008 by DaleHohm 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...
VeeDub Posted April 28, 2008 Author Share Posted April 28, 2008 Finally got this to work! This code shows that for some silly reason the Web site uses the same URL for all the images. $oImgs = _IEImgGetCollection($oIE) $iNumImg = @extended ConsoleWrite("There are " & $iNumImg & " images on the page" & @CRLF) For $oImg in $oImgs ConsoleWrite("Img Info - src = " & $oImg.src & @CRLF) Next @Dale, thanks again for your help. VW 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