Jump to content

_arraudisplay .....help please


 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...