Thread Spawn

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with " This function is an Advanced Threading function in the UBot Extended Library. This command will spawn the specified number of threads, with the 'max concurrent' number of...")
 
Line 5: Line 5:
  
 
'''Max Concurrent:''' The number of threads that should be open at a time.
 
'''Max Concurrent:''' The number of threads that should be open at a time.
 +
''
 +
'''The Thread Spawn command should not be used with the thread command.'''''
  
 
== Example ==
 
== Example ==

Revision as of 16:55, 2 November 2015

This function is an Advanced Threading function in the UBot Extended Library. This command will spawn the specified number of threads, with the 'max concurrent' number of threads open at any given time.

Total Number of Threads: The number of threads being open.

Max Concurrent: The number of threads that should be open at a time. The Thread Spawn command should not be used with the thread command.

Example


add list to list(%Plant Tree Research,$list from text("Honeysuckle, Nasturtium, Thorn Flower, Honey Locust, Bougainvillea",","),"Delete","Global")
set list position(%Plant Tree Research,0)
thread spawn(5,5) {
    in new browser {
        navigate("google.com","Wait")
        wait(3)
        type text(<name="q">,$next list item(%Plant Tree Research),"Standard")
        wait(6)
    }
}

A list is created to provide list items to each thread created by the command. Inside the thread command is an In New Browser, which will open a new browser instance for each thread.

For each thread, a new window will open, and the search field will be filled with an item from the list.


Threadspawn.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox