Jump to content
UBot Underground

Thread Spawn And With Each Command Problems


Recommended Posts

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 %urls
Well it will popup 5 shared browser with:
url1 in shared browser 1, 
url2 in shared browser 2
url3 in shared browser 3
url4 in shared browser 4
url5 in shared browser 5
then..............
url6 in shared browser 1, 
url7 in shared browser 2
url8 in shared browser 3
url9 in shared browser 4
url10 in shared browser 5
Then repeat the process 10 times. Well until $list total is done?

Right now it gets the same url from the list on all shared browser
Let me know
Thanks

Link to post
Share on other sites

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)
}
Link to post
Share on other sites

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...