$list total

From UBot Studio
Revision as of 12:40, 13 October 2012 by LillyT (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

$list total is a Variable Function. A list's contents are numbered by their position starting from position 0. This function will return the total number of items in a list. The function is often used along with the loop command, which allows the loop to loop according to the number of items are within the list.


Example

The list total function is used to set a limit for how many times the commands in the loop command can loop.

add list to list(%my list, $list from text("hello,hi,how are ya", ","), "Delete", "Global")
set list position(%my list, 0)
loop($list total(%my list)){alert($next list item(%my list))}


Notice that there are three items separated by the comma in our list, which is populated using the list from text function.

File:Listtotal.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox