jdelaney Posted January 3, 2014 Posted January 3, 2014 (edited) but you aren't refreshing your object. It's not magically going to reinstate on the (?)new page(?): $oButton = _IEGetObjByName($oIE, "action:FindClins") $oButton.Focus() $oButton.Click() Sleep (5000) _IELoadWait($oIE) $oLinks = _IELinkGetCollection($oIE) Local $bFound = False For $oLink In $oLinks If StringInStr($oLink.innertext, "Delimited") Then $bFound = True $oLink.Focus() $oLink.Click() Exitloop EndIf Next If $bFound Then ConsoleWrite("found the link" & @CRLF) Else ConsoleWrite("did not find the link" & @CRLF) EndIf Unless you were pulling directly from the DOM: $oButton = _IEGetObjByName($oIE, "action:FindClins") $oButton.Focus() $oButton.Click() Sleep (5000) _IELoadWait($oIE) Local $bFound = False For $oLink In $oIE.document.links If StringInStr($oLink.innertext, "Delimited") Then $bFound = True $oLink.Focus() $oLink.Click() Exitloop EndIf Next Edited January 3, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
mikell Posted January 3, 2014 Posted January 3, 2014 jevbrowser, It is not easy as we cannot test as jdelaney said try the hard way For $oLink In $oIE.document.links If StringInStr($oLink.href, "format=tab") Then $oLink.Focus() $oLink.Click() Exitloop EndIf Next If this doesn't work, that means that there is a trick we can't guess
jevbrowser Posted January 3, 2014 Author Posted January 3, 2014 Woooah! It worked! Thank you! You guys are great! I really appreciate this. Now i have a much better foundation and i can build on what i have learned today. Thanks again. Just so you know, here is what worked finally. It's just what JD posted above: $oButton = _IEGetObjByName($oIE, "action:FindClins") $oButton.Focus() $oButton.Click() Sleep (5000) _IELoadWait($oIE) $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks If StringInStr($oLink.innertext, "Delimited") Then $oLink.Focus() $oLink.Click() Exitloop EndIf Next thanks, Jev
mikell Posted January 3, 2014 Posted January 3, 2014 (edited) Hem, the _IELoadWait finally does it... didn't you try it as I suggested before ? So you can fire the Sleep(5000) Glad we could help Edit Ohhh I seee.... it was the "$oLinks = _IELinkGetCollection($oIE)" missing Edited January 3, 2014 by mikell
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