web4you.pro 3 Posted March 31, 2016 Report Share Posted March 31, 2016 (edited) Please , help me I want to see and work in diffrent sites in the same time I put code, but There I can see still the same sites clear list(%list)add list to list(%list,$list from text("http://www.ubotstudio.com/resourceshttp://www.ubotstudio.com",$new line),"Delete","Global")set(#count,0,"Global")loop(2) { thread { in new browser { navigate($list item(%list,#count),"Wait") increment(#count) } }} How it's solving ? Edited March 31, 2016 by web4you.pro Quote Link to post Share on other sites
pash 504 Posted March 31, 2016 Report Share Posted March 31, 2016 try.1. clear list(%MyList) add list to list(%MyList,$list from text("http://www.ubotstudio.com/resources http://www.ubotstudio.com",$new line),"Delete","Global") set list position(%MyList,0) set(#Num,0,"Global") loop(2) { Go(#Num) increment(#Num) wait(0.01) } define Go(#Num) { thread { in new browser { navigate($list item(%MyList,#Num),"Wait") wait for browser event("Everything Loaded","") } } } 2. clear list(%MyList) add list to list(%MyList,$list from text("http://www.ubotstudio.com/resources http://www.ubotstudio.com",$new line),"Delete","Global") set list position(%MyList,0) thread spawn($list total(%MyList),2) { in new browser { navigate($next list item(%MyList),"Wait") wait for browser event("Everything Loaded","") } } 1 Quote Link to post Share on other sites
Bot-Factory 602 Posted March 31, 2016 Report Share Posted March 31, 2016 clear list(%list) add list to list(%list,$list from text("http://www.ubotstudio.com/resources http://www.google.com",$new line),"Delete","Global") set(#count,0,"Global") loop(2) { LoadPage(#count) increment(#count) wait(0.25) } define LoadPage(#listposition) { thread { in new browser { navigate($list item(%list,#listposition),"Wait") wait(5) } } } Couple of things: 1. Do not change a global variable from within threads. That could mess up stuff because two threads might try to change it at the same time.2. You should always have a short wait in between launching new threads.3. Variables you need within a thread should be passed to the thread via a define and then using a local variable within the define / thread. Hope that helpsDan 1 Quote Link to post Share on other sites
web4you.pro 3 Posted March 31, 2016 Author Report Share Posted March 31, 2016 Very clear thank you !! 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.