Brutal 164 Posted January 15, 2013 Report Share Posted January 15, 2013 I hope I explain this well enough. 1- I scrape data from multiple pages. 2- Each data set gets saved into it's own list. The 1st list structure is"(0)(1)(2)(3)(4)...and so on The 2nd list structure is"(0)(1)(2)(3)(4)...and so on So, I have 2 of those lists... One list contains webpage titles and the other contains webpage urls. I want to be able to get to display as: (0)title(0)url (1)title(1)url And so on. in an "load H*ml" window. So, instead of it displaying as: title title title titleurl url url url I want...titleurl titleurl titleurl Quote Link to post Share on other sites
k1lv9h 76 Posted January 15, 2013 Report Share Posted January 15, 2013 Hi, Sample code: set(#titletoload, "title1 title2 title3 title4", "Global") set(#urltoload, "url1 url2 url3 url4", "Global") clear list(%titles) add list to list(%titles, $list from text(#titletoload, $new line), "Delete", "Global") clear list(%urls) add list to list(%urls, $list from text(#urltoload, $new line), "Delete", "Global") set(#htmlformatted, $nothing, "Global") loop($list total(%titles)) { set(#titleitem, "No value", "Global") if($comparison($list position(%titles), "<", $list total(%titles))) { then { set(#titleitem, $next list item(%titles), "Global") } else { } } set(#urlitem, "No value", "Global") if($comparison($list position(%urls), "<", $list total(%urls))) { then { set(#urlitem, $next list item(%urls), "Global") } else { } } set(#htmlformatted, "{#htmlformatted}{#titleitem}<br>{$new line}{#urlitem}<br>{$new line}<br><br>{$new line}", "Global") } load html(#htmlformatted) Kevin Quote Link to post Share on other sites
Brutal 164 Posted January 15, 2013 Author Report Share Posted January 15, 2013 Kevin, - thanks so much for jumping in and to help - I truly appreciate it! 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.