Run multiple function at the same time



  • Hi guys, i Just want to know if there is a way to run multiple functions at the same time in 1 thread?

    For ex. Running 'Wait for element to exist' while the main functions are running as you intended them to be.

    Would appreciate if someone has an idea on how to do this. Thanks



  • Would like to know that aswell.
    Any solution or sample project? @support



  • There is an action "Call function in several threads".
    Read explanation below that action in BAS itself.
    It starts with:
    Execute function specified number of times with specified number of threads.
    You can think of it as running another script inside current thread.



  • @GaG said in Run multiple function at the same time:

    There is an action "Call function in several threads".
    Read explanation below that action in BAS itself.
    It starts with:
    Execute function specified number of times with specified number of threads.
    You can think of it as running another script inside current thread.

    So for example if want to register an account and the bot enters all details, I can use "Call function in several threads" to solve Captcha while bot enters all details?



  • @8xrkan

    There are multiplem uses, as you could read in BAS
    description. You can experiment yourself and find out
    how you can use it.

    Typical situation to use it is proxy checker - You can run
    such function in 100 threads for example, so all 100 threads
    will open at same time and do that proxy check much quicker
    than in standard BAS, which would work sequentionally and
    open threads one after another and work lot slower to check
    1K proxies for example.

    But there is another use as you could read in description in
    BAS. Its a situation when you have main script, but need a function
    that will execute before and after main script finishes.

    So basic difference is that call function in several threads works
    in paralel, while simple function call works sequentially, one function
    after another (NOT in paralel)