That helped a lot. I thought because I'm parsing value to parameters I don't need global variables. But, is it possible to call another async function inside an async function?
How to run multiple functions with infinite loops simultaneously using multithreading?
-
Hi everyone,
I'm trying to create a BAS project with Load to load a page then I want to make 3 separate functions, where each function contains a while(true) infinite loop that continuously searches for a specific image and clicks it when found.
My goal is to have all 3 functions running simultaneously rather than sequentially. I understand BAS has multithreading capabilities (not referring to browser multithreading), but I'm not sure how to implement this properly.
Could someone guide me on:How to set up multithreading for custom functions in BAS?
Best practices for running multiple infinite loops concurrently?
Any potential issues I should be aware of when running simultaneous image search operations?Thanks in advance for any help!
-
@swyzz123 said in How to run multiple functions with infinite loops simultaneously using multithreading?:
Hi everyone,
I'm trying to create a BAS project with Load to load a page then I want to make 3 separate functions, where each function contains a while(true) infinite loop that continuously searches for a specific image and clicks it when found.
My goal is to have all 3 functions running simultaneously rather than sequentially. I understand BAS has multithreading capabilities (not referring to browser multithreading), but I'm not sure how to implement this properly.
Could someone guide me on:How to set up multithreading for custom functions in BAS?
Best practices for running multiple infinite loops concurrently?
Any potential issues I should be aware of when running simultaneous image search operations?Thanks in advance for any help!
what should the BAS do if it finds two items to click on at the same time?
-
@swyzz123 said in How to run multiple functions with infinite loops simultaneously using multithreading?:
Hi everyone,
I'm trying to create a BAS project with Load to load a page then I want to make 3 separate functions, where each function contains a while(true) infinite loop that continuously searches for a specific image and clicks it when found.
My goal is to have all 3 functions running simultaneously rather than sequentially. I understand BAS has multithreading capabilities (not referring to browser multithreading), but I'm not sure how to implement this properly.
Could someone guide me on:How to set up multithreading for custom functions in BAS?
Best practices for running multiple infinite loops concurrently?
Any potential issues I should be aware of when running simultaneous image search operations?Thanks in advance for any help!
I still can't imagine how a computer can use 2-3 mouse pointers at the same time.
-
Hold down the ctrl key, select a small area with the mouse. Then go on your own, the rest is at a basic level.
-
@swyzz123 said in How to run multiple functions with infinite loops simultaneously using multithreading?:
@Fox Add to queue until BAS is free from browser clicking.
Then what is the point of asynchronous work if the work will be done in turn? Perform the check and work in turn as well.