Jump to content
Sign in to follow this  

list view help

Recommended Posts


i need some help with this

can anyone point out how when i select something in the list

#include <GUIConstantsEx.au3>
#Include <GuiListView.au3>
#include <ButtonConstants.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $Client[1][1], $Array[1]

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 169, 300, 591)
$Label1 = GUICtrlCreateLabel("Program name?", 264, 8, 32, 17)
$Label3 = GUICtrlCreateLabel("X :", 264, 24, 17, 17)
$Label4 = GUICtrlCreateLabel("Y :", 328, 24, 17, 17)
$Char = GUICtrlCreateLabel("", 296, 8, 29, 17)
$xcoord1 = GUICtrlCreateLabel("", 295, 24, 10, 17)
$Y = GUICtrlCreateLabel("", 344, 24, 10, 17)
$listview = GUICtrlCreateListView("Client Name", 0, 8, 250, 150, BitOR($LVS_SORTDESCENDING, $LVS_LIST, $LVS_SHOWSELALWAYS));The right way to have multiple styles is with BitOr()
$Button5 = GUICtrlCreateButton("Exit", 336, 136, 75, 25)
$Button6 = GUICtrlCreateButton("Refresh", 256, 136, 72, 25)

$XInst = 140


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $Button5
        Case $Button6
    If _GUICtrlListView_GetSelectedIndices($listview) Then
$Go = ControlGetText($listview, "", "[CLASS:Static; INSTANCE:" & $XInst & "]")


Func _Refresh()
    $Client = WinList("[CLASS:wxWindowClassNR]")
    If $Client[0][0] > 0 Then
        For $X = 1 To $Client[0][0]
            GUICtrlCreateListViewItem($Client[$X][0], $listview)
        GUICtrlCreateListViewItem("No Clients Found", $listview)
EndFunc  ;==>_Refresh

when i select something from the list it gets a controlgettext from that program AKA Some Text That Show differnt stuff each min

when i click on the thing it will get the thing from the control text from that window with the text

and update it when the text changes

but i cant it to work?

anyone can help i will appreciate it


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.