UI stat monitor
This command is a UI Command. This command will display the value of any variable you insert into it on the UI area above the browser.
For example, you can set a variable to a scrape attribute command, and then insert the variable into the UI stat monitor command.
Whatever gets scraped will be displayed in the UI area above the browser. Simply drag the command into the scripting area, give the display a label, and insert the variable for the item you are trying to display.
Label: refers to the label for the value being tracked on the interface.
Content to Track: refers to the variable being tracked on the interface.
Example 1
set(#hello, "Hello!", "Global") ui stat monitor("Greeting:", #hello)
Running the script displays the value of the variable on the UI of the bot.
Example 2
You can also use the UI stat monitor to monitor items within lists and tables. This example will require a .csv or .txt file that contains a table with values.
For example:
A,B,C 1,2,3
ui stat monitor("Table Item:", #tableset) ui stat monitor("Current Table Row:", #currentrow) create table from file("C:\\Users\\Downloads\\mytable.csv", &testtable) set(#currentrow, 0, "Global") loop($table total rows(&testtable)) { set(#tableset, "{$table cell(&testtable, #currentrow, 0)} ", "Global") increment(#currentrow) wait(3) }
Running the script will loop through each row in Column 0 and display the value on the UI stat monitor.
The UI stat monitor will also display the current row number on the UI.
Notice that the table cell is placed in a variable before being inserted into the UI stat monitor.
Placing the table cell directly into the UI stat monitor can cause issues if a table has not already been created.
The UI stat monitor is a live command, and it is always checking the value of the variable, list item or table cell assigned to it.
Additional Information For UI Editor Users
The UI stat monitor cannot be used in a UI created with the UI editor.
Thankfully, the UI Editor comes with Label, and the Label allow you to display incrementing or decrementing variables on the UI, as well as displaying list totals and scraped values.
In this example, two labels are created. One to label the label that a value will be set to, and the other that will be changed in the set command.
Each label comes with an assigned variable. The variable being changed is the variable Label1.
set(#Label1, 4444, "Global")
Drag in a set command, select the variable Label1, and set the new value for the variable.
Notice that the new value is displayed on the UI after running the set command.