haggard Posted July 2, 2011 Posted July 2, 2011 Hi, I have a problem with that and didnt find any solution yet. I try to click link, which containts word 'yahoo'. For example: text on the site like: There is example text http://google.com Once again http://yahoo.com/asbajkadsn213 etc... Thers much links on the site, but I dont know how to find this one and then click. Thanks
JohnOne Posted July 2, 2011 Posted July 2, 2011 How did you fare, perusing _IELinkClickByText() example in the help file? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Malkey Posted July 2, 2011 Posted July 2, 2011 Try this. ; ******************************************************* ; Modified example from _IELinkGetCollection help file - Open browser with AutoIt thread example, get link collection, ; loop through items and display and click the "Yahoo" associated link URL references ; ******************************************************* ; #include <IE.au3> Local $oIE = _IECreate("http://www.autoitscript.com/forum/topic/130400-click-link-which-contains-selected-word/", 1, 1, 1, 1) Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found", 2) For $oLink In $oLinks If StringInStr($oLink.href, "Yahoo") Then MsgBox(0, "Link Info", $oLink.href, 2) $oLink.click EndIf Next
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