Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
htm comand to find links
#2
Usually when you click a link you get new page. If these links don't open a new page, can be used this code:

Code:
Copy      Help
Htm el=htm("BODY" "" "" "+IEFrame" 0 0 0x20) ;;get BODY element which is container for all visible elements
MSHTML.IHTMLElement2 el2=+el.el ;;get IHTMLElement2 interface because we need getElementsByTagName function
MSHTML.IHTMLElement el3
foreach el3 el2.getElementsByTagName("A") ;;enumerate hyperlinks and anchors
,str linktext=el3.innerText ;;get link text
,if(!linktext.len) continue
,out linktext ;;remove this
,if(linktext.beg("DeflautLink"))
,,el3.click

Similar code also can be used to check all checkboxes.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)