$common list items

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "$common list items is a Variable Function. This function allows you to compare two lists and return a list containing all items that are common to both...")
 
Line 7: Line 7:
  
 
== Example ==
 
== Example ==
 
+
<pre>
 
clear list(%list2)
 
clear list(%list2)
 
clear list(%list1)
 
clear list(%list1)
Line 13: Line 13:
 
add list to list(%list2, $list from text("a,b,x,v", ","), "Delete", "Global")
 
add list to list(%list2, $list from text("a,b,x,v", ","), "Delete", "Global")
 
type text(<about me textarea>, $common list items(%list1, %list2), "Standard")
 
type text(<about me textarea>, $common list items(%list1, %list2), "Standard")
 +
</pre>
  
 
[[File:common.jpg]]
 
[[File:common.jpg]]

Revision as of 19:17, 18 October 2012

$common list items is a Variable Function. This function allows you to compare two lists and return a list containing all items that are common to both lists. This function works in the opposite way that the subtract list function works. Instead of comparing two lists and finding items only unique to the first list, it finds list items common to both lists.


Example

clear list(%list2)
clear list(%list1)
add list to list(%list1, $list from text("a,b,c,d", ","), "Delete", "Global")
add list to list(%list2, $list from text("a,b,x,v", ","), "Delete", "Global")
type text(<about me textarea>, $common list items(%list1, %list2), "Standard")

File:Common.jpg


Running the script above should return only items a and b in the field that will be filled. List items a and b are common to both lists.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox