Sort Table
From UBot Studio
(Difference between revisions)
(Created page with "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 i...") |
|||
(5 intermediate revisions by one user not shown) | |||
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. | ||
+ | |||
+ | |||
+ | '''Table:''' The table being sorted. | ||
+ | |||
+ | '''Column Index:''' The column index being sorted. | ||
Line 9: | Line 18: | ||
<pre> | <pre> | ||
− | create table from file("C:\\Users\\Desktop\\ | + | create table from file("C:\\Users\\Desktop\\test2.txt", &fkg) |
− | plugin command("TableCommands.dll", "sort table", & | + | plugin command("TableCommands.dll", "sort table", &fkg, 1) |
</pre> | </pre> | ||
− | You will need to use the browse button to | + | 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]] | [[File:sort.png]] | ||
+ | |||
+ | |||
+ | |||
+ | Once the script is run, the numbers are arranged correctly numerically. | ||
+ | |||
+ | |||
+ | |||
+ | [[File:sort1.png]] |
Latest revision as of 20:49, 20 May 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.
Table: The table being sorted.
Column Index: The column index being sorted.
[edit] 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.
Once the script is run, the numbers are arranged correctly numerically.