Jump to content

Recommended Posts

Dear all,

Is there a way to perform an array sort? I want to sort it according to the Hex addresses in it...

BTW - can it be sort with the bubble sort algorithm?

Here is what I have:
















Here is what I need :P
















Link to post
Share on other sites

#include <Array.au3>
Dim $Myarray[5][3]

$Myarray[0][0] = "Filename1.abc"
$Myarray[0][1] = "3A90"
$Myarray[0][2] = "3ABF"

$Myarray[1][0] = "Filename4.abc"
$Myarray[1][1] = "0020"
$Myarray[1][2] = "0417"

$Myarray[2][0] = "Filename3.abc"
$Myarray[2][1] = "5800"
$Myarray[2][2] = "FFFF"

$Myarray[3][0] = "Filename5.abc"
$Myarray[3][1] = "0000"
$Myarray[3][2] = "001F"

$Myarray[4][0] = "Filename2.abc"
$Myarray[4][1] = "0540"
$Myarray[4][2] = "0AFF"

_ArraySort($Myarray, 0, 0, 0, 3, 1)
For $x = 0 To 4
    $msg = ""
    For $y = 0 To 2
        $msg &= $Myarray[$x][$y] & @LF
    MsgBox(0, $x, $msg)

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...