Sort Table

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 4: Line 4:
  
 
The command will sort numerically or alphabetically depending on which applies in the column index specified.
 
The command will sort numerically or alphabetically depending on which applies in the column index specified.
 +
 +
If the items in the specified column consists of numbers, the items will be sorted numerically.
 +
 +
Otherwise, the items in the specified column are sorted alphabetically.
  
  
Line 9: Line 13:
  
 
<pre>
 
<pre>
create table from file("C:\\Users\\Desktop\\test1.txt", &test1)
+
create table from file("C:\\Users\\Desktop\\test2.txt", &fkg)
plugin command("TableCommands.dll", "sort table", &test1, 1)
+
plugin command("TableCommands.dll", "sort table", &fkg, 1)
  
 
</pre>
 
</pre>
Line 16: Line 20:
  
 
You will need to use the browse button to find a file you would like to populate your table with for the script.
 
You will need to use the browse button to find a file you would like to populate your table with for the script.
 +
 +
Notice that the numbers in the table are out of order.
 +
 +
[[File:sort.png]]
 +
 +
 +
 +
Once the script is run, the numbers are arranged correctly numerically.
 +
 +
 +
 +
[[File:sort1.png]]

Revision as of 21:36, 24 March 2013

Sort Table is a Data Command.

This command sorts a table by column index.

The command will sort numerically or alphabetically depending on which applies in the column index specified.

If the items in the specified column consists of numbers, the items will be sorted numerically.

Otherwise, the items in the specified column are sorted alphabetically.


Example

create table from file("C:\\Users\\Desktop\\test2.txt", &fkg)
plugin command("TableCommands.dll", "sort table", &fkg, 1)


You will need to use the browse button to find a file you would like to populate your table with for the script.

Notice that the numbers in the table are out of order.

Sort.png


Once the script is run, the numbers are arranged correctly numerically.


Sort1.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox