Sign in to follow this  
Followers 0
Aceguy

Why 10 is before 9..................

2 posts in this topic

Here my code and the results are...

0

1

10

11

12

....

19

2

20

21

...

25

3

4

5

6

i know its due to its sorting by the first number fist, then the second, but thats not what i want it to do.

#include <GUIConstants.au3>
#include <Array.au3>
#include <Guilist.au3>


$my_gui=GUICreate("my gui")
$My_list=GUICtrlCreateList("",10,10,-1,-1)

$read = GUICtrlCreateButton("Read",10,165)
$save= GUICtrlCreateButton("Save",10,200)
$input_box=GUICtrlCreateInput("Name",10, 230,100)
$who = GUICtrlCreateButton("Compare",60,200)


GUISetState()

While 1
    $msg=GUIGetMsg()
Select

case $msg = $read
                    
                    for $xpix = 0 to 25
                        
                    $xpix_color=PixelGetColor(680+$xpix,551)
                    GUICtrlSetData($My_list,$xpix&"="&$xpix_color)
                next
case $msg = $save or $msg = -3
                $myname= GUICtrlRead($input_box)
                For $x = 0 To _GUICtrlListCount($My_list) - 1
                    
                    IniWrite(@DesktopDir & "\test.ini", $myname, $x, _GUICtrlListGetText($My_list, $x))
                Next
if $msg = -3 Then
ExitLoop
EndIf

case $msg = $who

$var = IniReadSection(@DesktopDir & "\test.ini", "Name")


For $i = 1 To $var[0][0]
        MsgBox(4096, "", $var[$i][1])
    Next


EndSelect
WEnd

Anyone help me please. (BTW code is still WIP, so lots more to complete)

Share this post


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
Sign in to follow this  
Followers 0