Jump to content
UBot Underground

[Sell] Smart Thread Plugin - Easy threading


Recommended Posts

  • Replies 185
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi James.   I converted the example from the thread you posted. I also removed some of the stuff that was in the script that is not directly required to get the job done:   So here's the ThreadPlugin

So in general. With multithreading there are a couple of things you should be aware of.   1. Threads are running at the same time. So you can't use global variables to store data.  2. Add data to a gl

Duplicate post. I replied in the ExBrowser Thread.   Dan

Quick question...

I'm trying to use your plugin to run multiple defines (with loops) that each include their own variables that need to be used.

Now I've tried using "Thread control normal" & "Thread control Advanced add"

But both seem to only run the first define, it wont run each thread with its own define?

Link to post
Share on other sites

if I have understood your question try this

 

plugin command("Smartthreads.dll""Threadcontrol Advanced initial", 5)
plugin command("Smartthreads.dll""Thread control Advanced add""test""Loop Number", 2, "No")
plugin command("Smartthreads.dll""Thread control Advanced add""test1""Loop Number", 2, "No")
plugin command("Smartthreads.dll""Thread control Advanced finish wait")
define test(#row) {
    alert("test row:{#row}")
}
define test1(#row) {
    alert("test1 row:{#row}")
}

Link to post
Share on other sites

This does not work when used with my code for some reason,
 

I have each define set to open a new browser, and visit a site and each thread needs to use its own variaibles i have set to that define.

What happens is it uses the same variables that are set in the first define, and it ignores the second.

 

I did find another way around this but it's not stable, (using local variables plugin)

 

example code:

 

ui button("TEST") {
    plugin command("Smartthreads.dll""Threadcontrol Advanced initial", 2)
    plugin command("Smartthreads.dll""Thread control Advanced add""test""Loop Number", 2, "No")
    plugin command("Smartthreads.dll""Thread control Advanced add""test1""Loop Number", 2, "No")
    plugin command("Smartthreads.dll""Thread control Advanced finish wait")
}
define test(#row) {
    in new browser {
        set(#rowv"http://google.com""Global")
        navigate(#rowv"Wait")
        wait(10)
    }
}
define test1(#row) {
    in new browser {
        set(#rowv2"http://yahoo.com""Global")
        navigate(#rowv2"Wait")
        wait(10)
    }
}

When the button TEST is used, it will open two threads using the test define and use the next loop with the test1 define.

I'm looking to make it open each define at the same time, so it will open yahoo with 1 thread & google with the other, then loop and open the threads again with new variables i have setup.


EDITED:

I must have been real tired last night, as i spent about 3 hours trying diff methods of using this..
and it's very simple lol.

Here is what works for me rite now..

ui button("TEST") {

    plugin command("Smartthreads.dll""Thread control normal""test", 10, 1, "No")
}
define test(#row) {
    thread {
        in new browser {
            set(#rowv"http://google.com""Global")
            navigate(#rowv"Wait")
            wait(10)
        }
    }
    thread {
        in new browser {
            set(#rowv2"http://yahoo.com""Global")
            navigate(#rowv2"Wait")
            wait(10)
        }
    }
}

I never tried to use threads inside the thread plugin.
Not sure why i never tested this.

Just figured id post this, so if anyone else gets confused they can see it's very simple.

Link to post
Share on other sites

Another way would be:

 

ui button("TEST") {
    clear list(%urls)
    add list to list(%urls$list from text("http://google.com
http://yahoo.com
http://google.com
http://yahoo.com"$new line), "Don\'t Delete""Global")
    plugin command("Smartthreads.dll""Threadcontrol Advanced initial", 2)
    plugin command("Smartthreads.dll""Thread control Advanced add""test""List"%urls"No")
    plugin command("Smartthreads.dll""Thread control Advanced finish wait")
}
define test(#counter#url) {
    in new browser {
        navigate(#url"Wait")
        wait(5)
    }
}

Link to post
Share on other sites
  • 2 weeks later...

Update 1.1

 

Login to robobest.com to download the latest update (on the right hand side)

use the login credentials you entered on purchase. If you have forgot them use the reset password link.

 

Added:

 

Thread control Items Processed

 

This Gives a number for items processed, best used as part of a progress bar.

example code

ui stat monitor("processed", $plugin function("Smartthreads.dll", "Thread control Items Processed"))
plugin command("Smartthreads.dll", "Thread control normal", "testing", 10, 3, "No")
define testing(#row) {
    in new browser {
        wait(1)
    }
}

Smart thread stop

 

This stops the threading process

 

example code

 

ui button("Start") {

    plugin command("Smartthreads.dll""Thread control normal""testing", 10, 3, "No")

}

ui button("Stop") {

    plugin command("Smartthreads.dll""Smart thread stop")

}

define testing(#row) {

    in new browser {

        wait(1)

    }

}

 

 

 

 

 

 

Did I already say how great the new STOP feature is? I just implemented it in one of my bots. And it removes a lot of the complexity I had in my bot before.

 

THANKS!

Dan

Link to post
Share on other sites
  • 2 weeks later...

have you got a example of the part your struggling with or an idea of what your trying to do.

I could do examples but they might not answer the part your trying to work out.

 

thanks

Kev123

Link to post
Share on other sites

Update 1.2

 

Login to robobest.com to download the latest update (on the right hand side)

use the login credentials you entered on purchase. If you have forgot them use the reset password link.

 

Added:

 

-Mod - If you have no proxies in your proxy list and have specified to use proxies. The code will continue without selecting a proxy.

This allows the same define to be used for proxies/no proxies.

Link to post
Share on other sites

Another strange behavior:

 

 

Code:

clear list(%testlist)
loop(5) {
    add item to list(%testlist$random text(5), "Delete""Global")
}
set(#test"testing""Global")
TestPlugin()
define TestPlugin {
    plugin command("Smartthreads.dll""Threadcontrol Advanced initial", 5)
    plugin command("Smartthreads.dll""Threadcontrol Advanced Add Value"#test"Variable")
    plugin command("Smartthreads.dll""Threadcontrol Advanced Add Value"%testlist"List")
    plugin command("Smartthreads.dll""Thread control Advanced add""TestProxy""List""x1
x2
x3
x4
x5""No")
    plugin command("Smartthreads.dll""Thread control Advanced finish wait")
}
define TestProxy(#counter#list#additionallist#variable#xyzz) {
    alert("{#counter}{#item} : {#additionallist} : {#variable} : {#xyzz}")
}

 

 

 

This behaves strange with V1.1 and V1.2

 

I thought that the values are always:

counter, proxy(if used), list item(if list option), addvalue1(list),addvalue(variable)

 

 

V1.1 Behavior (you have to remove the #xyzz from the define):

 

Counter, Missing, %testlist, #test

So the Advanced add list stuff (x1,x2... ) is not sent to the define at all

 

 

V1.2 Behavior

Counter, Missing, list(x1,x2...), %testlist, #test
 

 

I haven't tested with Proxy or additional Lists / variables yet.
Would be great if you could take a look at that behavior.Maybe also test with additional variables and lists. 

Thanks in advance for your help

Dan

Link to post
Share on other sites

Bugs with 1.2

 

 

plugin command("Smartthreads.dll""Threadcontrol Advanced Add Value""xx""Variable")

Doesn't work anymore.

i'll have this fixed shortly. the second post I will have to do some investigation if its been present it previous versions.

Link to post
Share on other sites

Update 1.3

 

Login to robobest.com to download the latest update (on the right hand side)

use the login credentials you entered on purchase. If you have forgot them use the reset password link.

 

fix- additional values not being passed when proxies not selected.(sorry introduced in 1.2)

fix-general housekeeping and tidying.

  • Like 1
Link to post
Share on other sites

I tried threading my browser based bots and http bots but it just didnt seem to be working properly with values and such. so im wondering if there are any basic examples because the 2 videos on the sales page dont show anything about threading with browser or http bots. and why the proxy control if we can just set it directly within each thread? do we have to use the 'thread' function? etc. just a basic browser sample and http sample would be nice to see

 

 

** i haven't downloaded the update yet but still, samples of browser and http bots would be great. even simple navigate or http get request with proxies ** 

Link to post
Share on other sites

I tried threading my browser based bots and http bots but it just didnt seem to be working properly with values and such. so im wondering if there are any basic examples because the 2 videos on the sales page dont show anything about threading with browser or http bots. and why the proxy control if we can just set it directly within each thread? do we have to use the 'thread' function? etc. just a basic browser sample and http sample would be nice to see

 

 

** i haven't downloaded the update yet but still, samples of browser and http bots would be great. even simple navigate or http get request with proxies ** 

In the download package are a couple of example files. 

They are showing a very simple browser example though.

 

But the smartthread plugin doesn't change anything in terms of how to make a define "Thread" ready.

 

Looking at the examples should give you an idea. And if you still struggle, please post your code and we will start from there.

 

Dan

Link to post
Share on other sites

as Dan suggested post code and everyone will be happy to help with the part you stuck on.

 

Here's a few examples with browser, the logic for using with http plugin isn't any different.

 

Just to be clear to anyone reading the plugin doesn't change the way threading works you defines need to be thread ready just like if you was using normal threading.

 

many thanks kev123

 

example 1 :threading using thread control normal

divider
comment("not needed code only adding items to list as example")
clear list(%temp)
add item to list(%temp, "http://google.com", "Delete", "Global")
add item to list(%temp, "http://bing.com", "Delete", "Global")
add item to list(%temp, "http://facebook.com.", "Delete", "Global")
divider
plugin command("Smartthreads.dll", "Thread control normal", "test", 3, 2, "No")
define test(#row) {
    in new browser {
        navigate($list item(%temp, #row), "Wait")
        wait(5)
    }
}

Example 2 threading using thread control normal and proxy with basic list.

divider
comment("not needed code only adding items to list as example")
clear list(%temp)
add item to list(%temp, "http://google.com", "Delete", "Global")
add item to list(%temp, "http://bing.com", "Delete", "Global")
add item to list(%temp, "http://facebook.com.", "Delete", "Global")
divider
comment("where enter proxy is you can simply put 
your proxy list name for example %proxys")
plugin command("Smartthreads.dll", "Thread control Add proxys", "5.5.5.1
5.5.5.2
5.5.5.3
5.5.5.4
5.5.5.5", "Basic List", "")
plugin command("Smartthreads.dll", "Thread control normal", "test", 3, 2, "Yes")
define test(#row, #proxy) {
    alert("Your proxy for thread: {#row}  is {#proxy}")
    in new browser {
        navigate($list item(%temp, #row), "Wait")
        wait(5)
    }
}

example three using the advanced add command alternative way of doing example one

divider
comment("not needed code only adding items to list as example")
clear list(%temp)
add item to list(%temp, "http://google.com", "Delete", "Global")
add item to list(%temp, "http://bing.com", "Delete", "Global")
add item to list(%temp, "http://facebook.com.", "Delete", "Global")
divider
plugin command("Smartthreads.dll", "Threadcontrol Advanced initial", 2)
plugin command("Smartthreads.dll", "Thread control Advanced add", "test", "List", %temp, "No")
plugin command("Smartthreads.dll", "Thread control Advanced finish wait")
define test(#row, #Listitem) {
    in new browser {
        navigate(#Listitem, "Wait")
        wait(5)
    }
}

Link to post
Share on other sites

If your using the proxy controller that's part of this plugin. You would just load the proxies in as normal for example

 

1.3.2.11:username:password

 

This will then get passed to the define and you would split them as normal. to set proxy and proxy credentials.

 

kev123

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...