webpro 31 Posted January 19, 2016 Report Share Posted January 19, 2016 How come this doesn't work?What's my mistake guys? ui open file("Get urls",#geturls) clear list(%geturls) add list to list(%geturls,$list from file(#geturls),"Delete","Global") wait(3) thread spawn($list total(%geturls),5) { with each(%geturls,#urls2) { in shared browser { navigate(#urls2,"Wait") wait($rand(3,10)) } } wait(2) } Now what i'm trying to accomplish is that the bot goes to the next url from a list, into a shared browser.So let's say i got 50 urls in the list %urlsWell it will popup 5 shared browser with:url1 in shared browser 1, url2 in shared browser 2url3 in shared browser 3url4 in shared browser 4url5 in shared browser 5then..............url6 in shared browser 1, url7 in shared browser 2url8 in shared browser 3url9 in shared browser 4url10 in shared browser 5Then repeat the process 10 times. Well until $list total is done?Right now it gets the same url from the list on all shared browserLet me knowThanks Quote Link to post Share on other sites
HelloInsomnia 1103 Posted January 19, 2016 Report Share Posted January 19, 2016 I don't think you need the with each in there because that will cause an internal loop and the thread spawn is already a loop basically. This works with in new browser but it doesn't seem to work so well in a shared browser. ui open file("Get urls",#geturls) clear list(%geturls) add list to list(%geturls,$list from file(#geturls),"Delete","Global") wait(3) thread spawn($list total(%geturls),5) { in new browser { navigate($next list item(%geturls),"Wait") wait for browser event("Everything Loaded","") wait(20) } wait(2) } Quote Link to post Share on other sites
webpro 31 Posted January 20, 2016 Author Report Share Posted January 20, 2016 Ahhh thanks NICK! Yeah you are right! It doesn't work all the time using IN SHARED BROWSER (odd?)Cause i did something similar as you the first time and it wasn't working.Why i tried the WITH EACH command. Quote Link to post Share on other sites
itexspert 47 Posted January 20, 2016 Report Share Posted January 20, 2016 ok why is it not working with In shared Browser??? did someone opened a ticket for this?? 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.