Hallo AutoIt'ler,
ich verzweifel im Moment an einem Problem.
Und zwar möchte ich ein 2D,Array sortieren (an und für sich ja einfach) jedoch nicht einfach nur irgendeinen Subindex, sondern folgendermaßen.
Ich habe z.B. Folgendes Array
[["Gruppe 1", 20, 8], _
["Gruppe 2", 32, 7], _
["Gruppe 2", 16, 9], _
["Gruppe 2", 34, 7], _
["Gruppe 2", 122, 9], _
["Gruppe 1", 35, 0], _
["Gruppe 3", 19, 6]]
Wenn ich es nun sortiere soll zunächst Subindex 0 und dann Subindex 1 sortiert werden. Sodass die Gruppen beieinander sind und Subindex 1 aufsteigend sortiert ist.
Aber beim Versuch dies mit _arraysort zu realisieren bin ich gescheitert:
#include "array.au3"
Local $avArray[7][3] = [ _
["Gruppe 1", 20, 8], _
["Gruppe 2", 32, 7], _
["Gruppe 2", 16, 9], _
["Gruppe 2", 34, 7], _
["Gruppe 2", 122, 9], _
["Gruppe 1", 35, 0], _
["Gruppe 3", 19, 6]]
_ArraySort($avArray,0,0,0,1)
_ArrayDisplay($avArray)
_ArraySort($avArray)
_ArrayDisplay($avArray)
Heraus kommt dann leider folgendes:
[Blockierte Grafik: http://img827.imageshack.us/img827/74/arraysort.png]
Habe es schon einmal versucht, indem ich es in ein neues Array schreibe. Da passte aber irgendwie garnichts mehr ;).
Google hat mir auch nicht weitergeholfen. Nun wollte ich mich an euch wenden.
Hoffe es hat jemand, wenn auch nur ansatzweise eine Idee wie ich es anstellen kann.
Vielen Dank schon einmal.
Gruß
Maha