Sample Code Scripts

From UBot Studio
Jump to: navigation, search

The sample scripts can be downloaded and run in both UBot 4 and 5. Feel free to customize the code to fit your project requirements.


1. Account Creator: [1]

This script should create a set of usernames and passwords and save them to a .txt file on your desktop called "Windows Accounts".

Simply change the number of loops to increase or decrease the amount of credentials that are created.


2. Change File Field: [2]

This script should navigate to a page with a sample form field for uploading files. The form field is at the bottom of the page. The script should fill the file field with

the file path from the file you specified in the UI open file at the top of the browser area.


3. Get Files (Pro Edition ONLY): [3]

This script should go into your desktop folder and grab all the file names in the folder. A list of all the files in your Desktop folder should be saved to the desktop. You can edit the Get files function to have the file name include or exclude the file path to the files.

Uses the Get Files function, which is a Pro edition function.


4. Documents Functions Example: [4]

This example uses the document functions commands to grab the url, the meta description, and title of the article located on the page the script navigates to when you click play. The items should be saved to a file on your desktop called "Document Text.txt". Feel free to try the set up on a different page with an article.


5. Url Function: [5]

This sample should simply navigate to the website in the navigate command, grab the url and save the url of the current page on in a file called "url.txt".

You can remove the navigate command and simply run the rest of the script on any website to grab the url from the website and save it to a file.


6. Change Proxy Command: [6]

This sample should change your ip according to the list of proxies you provided, and navigate to can ip checking website to confirm the IP change.

Simply browse for your list of Ips with the open file command in the UI area, and run the script. The loop should happen according to the number of proxies you have in your file list.


7. Adding a List to a List: [7]

This sample script adds a list from file to a list in UBot Studio. Simply browse for your file on the UI, and the file's contents will be added to the list in UBot Studio. You can then use the list to fill fields after the contents have been added.


8. Define command: [8]

This sample script demonstrates how to use the define command. In the first tab is define command with is a series of tasks inside it. In the second tab is the custom command we created using the define command. Click "run" on the second tab, it will run the task we set up within the define command. Feel free to add and remove commands to see how it works for you.


9. Looping to Fill a Field with a List: [9]

This sample script will create a list based on the file you select on the UI and fill the fields on the sample scripts page with it's contents. Select a file populated with a list from the UI above the browser area, and then click "Run".


10. Looping to Fill a Field with a Table: [10]

This sample script will allow you to browse for a CSV in the browse button on the UI, and fill fields with the contents of the first and second column. If you have more columns, simply create another type text command for the field you'd like to fill, insert a table cell function, type the number for the extra column (starts from 0, so the third column in a three column CSV is column number 2) and drag the variable labeled "row" into the section of the table cell command labeled "row".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox