Jump to content
UBot Underground

magoo

Fellow UBotter
  • Content Count

    102
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by magoo

  1. VB is just skinning a cat a different way, the simple code i posted above will do exactly what you want and will only post each list item once.

     

    If you only want to flow from the start to finish of a list and only visit each list item once, then next list item works just fine. Set your list item to a var and it can be used anyware within the loop. Simply use list total to get number of loops

    • Like 1
  2. Aymen's plugin is probably one of THE most useful (and at the same time very complex) plugin in UBS world...

     

    And Aymen is not only an excellent developer, but also a great vendor who cares about his customers.

    Try to ask his help directly, he may solve your issue in a few minutes...

     

    Hope this helps...

    Steve, I think you may have mistaken the OP, LazyBotter was sharing code to help the community, not posting an issue..

  3. I made an example so you can see how next list item works. You should be able to adapt the same thing to any bot. Where I have loaded html for you to see how it works, just replace with your image upload code.

    clear list(%image)
    add list to list(%image, $list from text("Image_1
    Image_1
    Image_3
    Image_4", $new line), "Delete", "Global")
    loop($list total(%image)) {
        set(#image, $next list item(%image), "Global")
        load html(#image)
    }
    
    
  4. If two threads need to start from the same list position but from different lists then why not assign the list position to both threads before they start,

    rather than use next list item. That way you will not rely on chance by using your 5 second wait, because you have assigned the list position to both threads. you will know thread 1 is working on list A at position1 and tread 2 is working on list B at position1

  5. I have to agree with both comments above. Building a business online is a job and one that takes time, a lot of it! Anybody who tells you, you can make big money with no experiences and no out lay is full of shit.

     

    If you need money now, then uBot is not the answer, nor is any other online venture with the promise of great wealth.

  6. I made an autoresponder bot. I want to be able to change the message it sends out once the bot is compiled, altering the message with a ui block text. However, I need to use other variables with my reply. 

     

    Is there anyway to put in the other variables inside the ui block text?

     

    for example i want to use a variable that address the recipient  by his/her first name. So i have a #firstname variable..

     

    How do I enter #firstname variable into the ui block text?

    Why didn't you open your thread with a clear explanation like this??

  7. You need to explain better what you need then, because all you had to do was add the functions from your own test bot above.

     

    If you are trying to achieve what your  thread-error-example.ubot does, then this code has been modified to perform the tasks as per your bot. Each line of your text file is performed in a new thread with a max of ten threads open at once. Look at the logic and you will be able to add to it.

     

    ui open file("some file with data in it - mine is comma separated", #mydatafile)
    set(#readmydatafile, $read file(#mydatafile), "Global")
    clear list(%mydatafileiread)
    add list to list(%mydatafileiread, $list from text(#readmydatafile, ","), "Delete", "Global")
    if($comparison($list total(%urls), "<=", 10)) {
        then {
            set(#num threads, $list total(%mydatafileiread), "Global")
        }
        else {
            set(#num threads, 10, "Global")
        }
    }
    set(#number accounts, $list total(%mydatafileiread), "Global")
    set(#num created, 0, "Global")
    set(#used threads, 0, "Global")
    loop(#number accounts) {
        loop while($comparison(#used threads, ">=", #num threads)) {
            wait(1)
        }
        loop process()
    }
    define loop process {
        increment(#used threads)
        increment(#num created)
        registration procedure()
    }
    define registration procedure {
        wait(1)
        thread {
            in new browser {
                registration code here()
                decrement(#used threads)
            }
        }
    }
    define registration code here {
        if($comparison(#num created, "<", #number accounts)) {
            then {
                ubotplay($next list item(%mydatafileiread))
            }
            else {
            }
        }
    }
    define ubotplay(#some info from data file) {
        navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
        wait for element(<class="social_connect">, "", "Appear")
        type text(<username field>, #some info from data file, "Standard")
        click(<value="Submit">, "Left Click", "No")
        wait(2)
    }
    
  8. Here is an example for you,

     

    navigate("http://www.google.com", "Wait")
    wait for element(<id="footer">, "", "Appear")
    type text(<name="q">, "free bots", "Standard")
    click(<name="btnG">, "Left Click", "No")
    wait for element(<id="foot">, "", "Appear")
    clear list(%urls)
    add list to list(%urls, $list from text($scrape attribute(<outerhtml=w"<a href=\"*\" class=\"*\" onmousedown=\"return rwt(this*)\">*</a>">, "href"), $new line), "Delete", "Global")
    if($comparison($list total(%urls), "<=", 10)) {
        then {
            set(#num threads, $list total(%urls), "Global")
        }
        else {
            set(#num threads, 10, "Global")
        }
    }
    set(#number accounts, $list total(%urls), "Global")
    set(#num created, 0, "Global")
    set(#used threads, 0, "Global")
    loop(#number accounts) {
        loop while($comparison(#used threads, ">=", #num threads)) {
            wait(1)
        }
        loop process()
    }
    define loop process {
        increment(#used threads)
        increment(#num created)
        registration procedure()
    }
    define registration procedure {
        wait(1)
        thread {
            in new browser {
                registration code here()
                decrement(#used threads)
            }
        }
    }
    define registration code here {
        if($comparison(#num created, "<", #number accounts)) {
            then {
                goto url($next list item(%urls))
            }
            else {
            }
        }
    }
    define goto url(#url) {
        navigate(#url, "Wait")
        wait for browser event("Page Loaded", "")
        wait(10)
    }
    
×
×
  • Create New...