I would like to save my facebook friend's list to notepad and I having a difficult doing so. What I need is for QM to through the entire list, get the name and the corresponding html link showing up in the Status bar and saved them somehow into notepad using commas as separator.
I am attaching a picture as an example. When the macro finishes, the following should be listed on notepad:
HtmlDoc d.InitFromInternetExplorer(win("""IEFrame")) ARRAY(MSHTML.IHTMLElement) a
d.GetLinks(a) int i str su sa sn for i 0 a.len ,su=a[i].getAttribute("href"2) ,if(!su.beg("/profile.php?id="))continue ,sn=a[i].innerText ,if(!sn.len)continue;;image ,sa.formata("%s, http://www.facebook.com%s[]" sn su)
str sf="$desktop$\facebook friends.txt"
sa.setfile(sf) run sf
MSHTML.IHTMLDocument2 d=htm(win("""IEFrame")) MSHTML.IHTMLElement e str su sa sn foreach e d.links ,su=e.getAttribute("href"2) ,if(!su.beg("/profile.php?id="))continue ,sn=e.innerText ,if(!sn.len)continue;;image ,sa.formata("%s, http://www.facebook.com%s[]" sn su)
str sf="$desktop$\facebook friends.txt"
sa.setfile(sf) run sf
MSHTML.IHTMLDocument2 d=htm(win("""IEFrame")) MSHTML.IHTMLElement e str su sa sn foreach e d.links ,su=e.getAttribute("href"2) ,out su ;;this line displays link URL in QM output. It displays all links, not only friends. Edit the following code so that it would get URLs that you need. ,if(!su.beg("/profile.php?id="))continue ,sn=e.innerText ,if(!sn.len)continue;;image ,sa.formata("%s, http://www.facebook.com%s[]" sn su)
str sf="$desktop$\facebook friends.txt"
sa.setfile(sf) ;run sf ;;later uncomment this