ZonkDonkey 0 Posted June 1, 2016 Report Share Posted June 1, 2016 Hello, I am trying to create a bot that will navigate to a list of websited defined in a text file and then run through the list to take a screenshot. I have a feeling I am going to need a loopwhile type command but I'm getting lost on how to set it up. Here is roughly what I have so far: define Screenshot(#screenshot) { clear list(%ScreenshotURLs) add list to list(%ScreenshotURLs,$list from file("{$special folder("Application")}\\screenshot_urls"),"Delete","Global") LoadAndWait() navigate($next list item(%ScreenshotURLs),"Wait") LoadAndWait() save browser image($special folder("Application")) loop while("") { } } Thanks for the help! Quote Link to post Share on other sites
abbas786 78 Posted June 1, 2016 Report Share Posted June 1, 2016 Try this define Screenshot(#screenshot) { clear list(%ScreenshotURLs) add list to list(%ScreenshotURLs,$list from file("{$special folder("Application")}\\screenshot_urls"),"Delete","Global") set(#ListCounter,0,"Global") loop while($comparison(#ListCounter,"< Less than",$list total(%ScreenshotURLs))) { LoadAndWait() navigate($next list item(%ScreenshotURLs),"Wait") LoadAndWait() save browser image($special folder("Application")) increment(#ListCounter) } } 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.