Copy the functions that you have proved to work, in the test stack script and paste them into the WebScraper stack script. Then, perform these steps:
Go to the Media card. As with the Links card, we're not going to add any controls to the card, as we'll do that with the script. So, edit the card script.
Here's the Media card's
init
function and the needed global variables:global gPageHTML,gMediaList on init if the platform is "iphone" or the platform is "android" then put getMedia(gPageHTML) into gMediaList if the number of lines in gMediaList = 0 then answer "There is no media in this page!" else set the itemdelimiter to "/" put empty into tMediaNames repeat with a = 1 to the number of lines in gMediaList put the last item of line a of gMediaList into line a of tMediaNames end repeat mobilePick tMediaNames,1 if the result > 0 then put the result into tMediaLine ...