Sign in to follow this  
Followers 0
Aceguy

_arraudisplay .....help please

3 posts in this topic

here is my code

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


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

$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_color&"|")
                next
case $msg = $save
                dim $md 
                $myname= GUICtrlRead($input_box)
                For $x = 0 To _GUICtrlListCount($My_list) - 1
                    
                $data=_GUICtrlListGetText($My_list,$x)
            GUICtrlSetData($md,$data)
            Next
            _ArrayDisplay($md,"test")
    
            case $msg = -3
                ExitLoop

EndSelect
WEnd

I ultimatley would like the array to be displayed as 234234|2343|12341|11221|234322 ect..........

but cant get it to even display as

[0]6

[1]234234

[2]2343

ect....

Please Help, i have no hair left............. :D

Share this post


Link to post
Share on other sites



something like ?:

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


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

$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_color & "|")
            Next
        Case $msg = $save
            $data = ""
            $myname = GUICtrlRead($input_box)
            For $x = 0 To _GUICtrlListCount($My_list) - 1
                $data &= _GUICtrlListGetText($My_list, $x) & "|"
                ;GUICtrlSetData($md, $data)
            Next
            MsgBox(0,'show',$data)
            
        Case $msg = -3
            ExitLoop
            
    EndSelect
WEnd

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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