Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enumerate Elements on webpage
#4
Gintaras,

Any ideas to make this better?
Member function str.Html
Member function str.Html
Code:
Copy      Help
function str'Html str'Element str'Attibute [int'Index] [str&Results]

;EXAMPLE
;str s
;IntGetFile "http://www.google.com" s
;str Results
;str x.Html(s "a" "href" 5 Results)
;
;out x
;out "------"
;out Results

HtmlDoc d.InitFromText(Html)
ARRAY(MSHTML.IHTMLElement) aHtml
d.GetHtmlElements(aHtml Element)

for _i 0 aHtml.len
,Results+aHtml[_i].getAttribute(Attibute 2)
,if !(_i=aHtml.len-1)
,,Results+"[]"
this=aHtml[Index].getAttribute(Attibute 2);err ret 1
Definitely works for me in a lot of cases where I use to put a lot of code!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)