03-09-2012, 05:05 PM
all text and (URL)
Macro Macro1672
Macro Macro1672
out
str s=
;<html><body>
;<!--StartFragment--><a href="http://www.quickmacros.com/forum/viewtopic.php?p=22851" class="topictitle">Plain text</a>
;<br>
;by <a href="http://www.quickmacros.com/forum/memberlist.php?mode=viewprofile&u=1745">ldarrambide</a> on 09 Mar 2012 16:19
;<!--EndFragment-->
;</body>
;</html>
HtmlDoc d
d.SetOptions(3)
d.InitFromText(s)
ARRAY(MSHTML.IHTMLElement) a
d.GetLinks(a)
int i
for i 0 a.len
,str href=a[i].getAttribute("href" 0)
,if href.len
,,str txt=a[i].innerText
,,txt+F" ({href})"
,,a[i].innerText=txt
s=d.GetText
out s