ah, at last, fine!Nico_C_GHS wrote:The items in the list are stored as " name TAB score CR" so that the list is always kept semi-neat.
I was just giving you 2 (TWO) examples on how to use the sort commandNico_C_GHS wrote:As for the code you think you've fixed, I have been trying to make sense of your final statement.
It would appear that you are trying to sort a list of scores by name for me, which is totally the opposite of what I was aiming for.
I don't understand what it was you were trying to suggest with that statement at all, could you elaborate?
To sort your list NUMERIC (item 2 of each line, which is the SCORE, right?) do this:
...
## tList = your list of highscores in the above mentioned format -> name TAB score
set itemdel to TAB
sort lines of tList numeric by item 2 of each
## Or if you want the highest scores at the top of the list:
## sort lines of tList DESCENDING numeric by item 2 of each
...
This will sort your list by, well item 2 of each line numeric
Check "sort container" in the dictionary!
Best
Klaus