skinnyking 0 Posted November 1, 2016 Report Share Posted November 1, 2016 Hi guys I have a scraped list and I'd like to be able to show the results within the Load HTML command. I've tried this using a loop (also tried just posting the variable and also the list) but I can't get each item to appear on a new line within the HTML, sounds simple but it just doesn't seem to want to work for me. Anybody help please? set(#results,$scrape attribute(<outerhtml=w"<a href=\"/web/*/*\">*</a>">,"innertext"),"Global")add list to list(%theresults,$list from text(#results,$new line),"Delete","Global")loop while($comparison($list total(%theresults),"> Greater than",0)) { set(#current item,$list item(%theresults,0),"Global") load html("{#current item}<br />") remove from list(%theresults,0)} Quote Link to post Share on other sites
darryl561 177 Posted November 1, 2016 Report Share Posted November 1, 2016 Give this a try: set(#results,$scrape attribute(<outerhtml=w"<a href=\"/web/*/*\">*</a>">,"innertext"),"Global") clear list(%theresults) add list to list(%theresults,$list from text(#results,$new line),"Delete","Global") set list position(%theresults,0) clear list(%final result) loop($list total(%theresults)) { add item to list(%final result,"{$next list item(%theresults)}<br>","Don\'t Delete","Global") } load html(%final result) Quote Link to post Share on other sites
pash 504 Posted November 1, 2016 Report Share Posted November 1, 2016 I'm not good html and javascript.but this i found.this sample. load html("<textarea id=\"alltext\" style=\"width: 300px; height: 150px;\"></textarea>") set(#loop,0,"Global") loop(10) { run javascript("var textarea = document.getElementById(\'alltext\'); textarea.value += \"Hello {#loop}\\n\"; textarea.scrollTop = textarea.scrollHeight;") wait(1) increment(#loop) } Quote Link to post Share on other sites
skinnyking 0 Posted November 2, 2016 Author Report Share Posted November 2, 2016 (edited) Thanks guys! I went with Darryl's solution (just because it was the first I tried) but it works a treat. I really appreciate your help Edited November 2, 2016 by skinnyking Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.