Clear All Data
From UBot Studio
(Difference between revisions)
(Created page with "Clear All Data is a Data Command. This command empties the contents of a list, tables and variables within a script. == Example == <pre> ui button("Clea...") |
(→Example) |
||
| (One intermediate revision by one user not shown) | |||
| Line 23: | Line 23: | ||
| − | Running the script will | + | Running the script will clear all values from all lists, tables and variables within a script. |
Notice that the clear all data command has been placed in a UI button command. | Notice that the clear all data command has been placed in a UI button command. | ||
| − | Once the UI button is clicked, all variables, lists, and tables are cleared and | + | Once the UI button is clicked, all variables, lists, and tables are cleared of their values and totals. |
| − | + | ||
[[File:clearalldata.gif]] | [[File:clearalldata.gif]] | ||
Latest revision as of 19:06, 26 March 2015
Clear All Data is a Data Command.
This command empties the contents of a list, tables and variables within a script.
[edit] Example
ui button("Clear ALL") {
clear all data
}
ui stat monitor("Var Number:",#number)
ui stat monitor("Var Num:",#num)
ui stat monitor("List Numbr:",$list total(%numbr))
ui stat monitor("Table Row Numbr:",$table total rows(&nmbr))
ui stat monitor("Table Column Numbr:",$table total columns(&nmbr))
set(#number,4,"Global")
set(#num,34,"Global")
add item to list(%numbr,"one","Delete","Global")
set table cell(&nmbr,0,0,"one")
Running the script will clear all values from all lists, tables and variables within a script.
Notice that the clear all data command has been placed in a UI button command. Once the UI button is clicked, all variables, lists, and tables are cleared of their values and totals.
