Habe dir mal WM_Notify eingebaut, teste mal und achte auf den index, ich denke das sollte dir schonmal weiterhelfen
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <ListViewConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $hListView, $Texturearray[2][5]
$pingcheck = Ping("www.google.de")
If @error Then
MsgBox(0, "Internet", "Du hast keine verbindung zum Internet! Bitte verbinde dich mit dem Internet um dieses Tool zu benutzen!")
Exit
EndIf
$Texturearray[0][0] = "Texturenpack1"
$Texturearray[0][1] = "32x32"
$Texturearray[0][2] = "20 MB"
$Texturearray[0][3] = "LINK/Pfad ZUM BILD"
$Texturearray[0][4] = "LINK ZUM DOWNLOAD"
$Texturearray[1][0] = "Texturenpack2"
$Texturearray[1][1] = "64x64"
$Texturearray[1][2] = "20 MB"
$Texturearray[1][3] = "LINK/Pfad ZUM BILD"
$Texturearray[1][4] = "LINK ZUM DOWNLOAD"
$GUI = GUICreate("Form1", 547, 513, 192, 117)
$Button1 = GUICtrlCreateButton("Donate", 352, 464, 65, 25, $WS_GROUP)
$Progress1 = GUICtrlCreateProgress(24, 392, 497, 25)
$Group1 = GUICtrlCreateGroup("Vorschau", 24, 112, 497, 257)
$Pic = GUICtrlCreatePic("", 24,112,497,257)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button2 = GUICtrlCreateButton("Download", 24, 448, 97, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Texturenpack #", 24, 424, 80, 17)
$Label2 = GUICtrlCreateLabel("Größe #", 120, 424, 43, 17)
$Label3 = GUICtrlCreateLabel("# %", 256, 424, 30, 17)
$hListView = _GUICtrlListView_Create($GUI, "", 24, 16, 497, 89)
_GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
_GUICtrlListView_InsertColumn($hListView, 0, "Name", 165)
_GUICtrlListView_InsertColumn($hListView, 1, "Auflösung", 165)
_GUICtrlListView_InsertColumn($hListView, 2, "Größe", 165)
; Fügt die Items hinzu
_GUICtrlListView_AddItem($hListView, "Texturenpack1", 0)
_GUICtrlListView_AddSubItem($hListView, 0, "32x32", 1)
_GUICtrlListView_AddSubItem($hListView, 0, "20 MB", 2)
_GUICtrlListView_AddItem($hListView, "Texturenpack2", 1)
_GUICtrlListView_AddSubItem($hListView, 1, "64x64", 1)
_GUICtrlListView_AddSubItem($hListView, 1, "20 MB", 2)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
$hWndListView = $hListView
If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($hListView)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndListView
Switch $iCode
Case $NM_DBLCLK ; Wird vom ListView gesendet, wenn der Benutzer ein Item mit der linken Maustaste doppelklickt
$tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
_DebugPrint("$NM_DBLCLK" & @LF & "-->hWndFrom:" & @TAB & $hWndFrom & @LF & _
"-->IDFrom:" & @TAB & $iIDFrom & @LF & _
"-->Code:" & @TAB & $iCode & @LF & _
"-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
"-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
"-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
"-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
"-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
"-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
"-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
"-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
"-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
GUICtrlDelete($Pic)
$Pic = GUICtrlCreatePic($Texturearray[DllStructGetData($tInfo, "Index")][3], 24,112,497,257)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Pic = ' & $Pic & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY
Func _DebugPrint($s_text, $line = @ScriptLineNumber)
ConsoleWrite( _
"!===========================================================" & @LF & _
"+======================================================" & @LF & _
"-->Zeile(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _
"+======================================================" & @LF)
EndFunc ;==>_DebugPrint