Azh 0 Posted February 25, 2011 (edited) Hi, I am trying to figure out the best way to automate a task of mine. On this website there are a lot of links, but the only ones I need to worry about each have an html attribute, class="red". I need to open all of these in a new tab (or new window if it is easier?) and then click on a particular image on that page. I know how to click on the image, that is trivial enough. But can anyone help me with opening those links based on that particular html attribute? And then to automate switching to the next tab/window? Thanks a lot! I know this is kind of a lot to ask help with but I am willing to throw a few bucks through paypal for someone to help me. If you want to help me further feel free to PM me. Edited February 25, 2011 by Azh Share this post Link to post Share on other sites
DaleHohm 65 Posted February 25, 2011 (edited) You don't give enough information to help you with the entire workflow, but here are some hints. class= equates to a property called className Get a collection of all of the emements that include the class you are looking for, DIV, for example: $oDivs = _IETagnameGetCollection($oIE, "div") loop through these looking for the ones that match your class and take action: For $oDiv in $oDivs If String($oDiv.className) = "red") Then ; take action on $oDiv EndIf Next your other steps will depend on lots of specifics of the HTML implementation. Dale Edited February 25, 2011 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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 Share this post Link to post Share on other sites