MrThingy 0 Posted December 17, 2021 Report Share Posted December 17, 2021 Hi all, OK, noob alert (sorry!). I bought the software ages ago and despite reading I am only just trying to put it into practice. Re: PROBLEM ADING TEXT FROM A LIST INTO A WEBSITES SEARCH BAR ON A LOOP I've defined a new list and entered 100k line items into a .txt file. I've named the list with good naming conventions and cleared it. I've photographed the area to enter text into. in the TEXT TO TYPE I am using the $text from list parameter (remember the list has 100k lines of date) No text is being called or entered into the search field. I would like the bot to visit a URL, enter the first line of text from a LIST, then scrape the result, and add to a new list to enrich the data. Then, LOOP on increments. Can anyone point me in the right direction please? Worried I am using the wrong parameter in the wrong place. Cheers. MrThing Quote Link to post Share on other sites
PRO 69 Posted December 18, 2021 Report Share Posted December 18, 2021 Here is a simple example how to use a loop and counter: comment("Prepare a list") clear list(%your_list) add list to list(%your_list,$list from text("Input 1 Input 2 Input 3 Input 4 Input 5",$new line),"Don\'t Delete","Global") set(#task_counter,0,"Global") set(#tasks_total,$list total(%your_list),"Global") comment("Loop to perform a task for every list entry") loop while($comparison(#task_counter,"< Less than",$list total(%your_list))) { alert($list item(%your_list,#task_counter)) increment(#task_counter) } alert("All done!") -------------------- You can run this code and see how it works. PS.: I would recommend not to loop through 100.000 items at once. Would divide it into smaller batches and/or to append results after each iteration to a file. Because it would be very frustrating if you need to wait 50.000 iterations, didn't save results yet and something goes wrong. Quote Link to post Share on other sites
MrThingy 0 Posted December 18, 2021 Author Report Share Posted December 18, 2021 Ok thank you. I’m guessing I could write a bot to cycle through smaller files? Lol 😝 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.