Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find HTML based on part of text
#2
To find object in web browser, use * in value.
Macro Macro2737
Code:
Copy      Help
int w=wait(3 WV win(" Firefox" "MozillaWindowClass"))
Acc a.Find(w "LINK" "Forum" "value=*foru*" 0x3015 3)

To find in downloaded HTML file, use HtmlDoc class.
Macro Macro2738
Code:
Copy      Help
out

str s
HtmlDoc d
d.SetOptions(2)
d.InitFromWeb("http://www.quickmacros.com/")
ARRAY(MSHTML.IHTMLElement) a; int i
d.GetLinks(a)
str url
for i 0 a.len
,s=a[i].getAttribute("href" 0)
,;out s
,if(matchw(s "*foru*")) out s

;d.FindHtmlElement("... ;;this could be easier but it cannot search just in href attribute


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)