Texturenpack Downloader

  • Hallo.

    ich möchte einen Minecraft TP Downloader erstellen und hab folgende frage:

    Wie kann ich es machen, dass wenn ich ein Item in Listview anklicke er ein bild in die gui Lädt?
    Wie kann ich es machen, dass wenn ich ein Item in Listview anklicke er mir den Download des TP's anbietet?

    Das Script

    [autoit]

    #include <ButtonConstants.au3>#include <GUIConstantsEx.au3>#include <ListViewConstants.au3>#include <ProgressConstants.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $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

    [/autoit][autoit][/autoit][autoit]

    $Form1_1 = 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)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)$ListView1 = GUICtrlCreateListView("Name |Größe |Auflösung", 24, 16, 497, 89, -1, BitOR($WS_EX_CLIENTEDGE,$LVS_EX_TRACKSELECT))GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50)GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50)$ListView1_0 = GUICtrlCreateListViewItem("Texturenpack1|20MB|64x64", $ListView1)$ListView1_1 = GUICtrlCreateListViewItem("Texturenpack2|30MB|32x32", $ListView1)GUISetState(@SW_SHOW)

    [/autoit][autoit][/autoit][autoit]

    While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
    Case $ListView1_0GUICtrlCreatePic("C:\Users\Christian\Desktop\minecraftlogo.jpg", 40, 136, 465, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    EndSwitchWEnd

    [/autoit]
  • Habs jetzt schonmal soo:


    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>


    $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


    $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)
    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)


    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    Kannst du mir was über WM_NOTIFY() sagen?

    Einmal editiert, zuletzt von Teare (30. November 2011 um 18:25)

  • Servous, du hast viele unnötige Includes in deinem Script

    [autoit]


    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    #include <ListViewConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit]


    diese reichen völlig aus ;)

    Gruß

  • Da ich mich damit nicht wirklich auskenne


    Ich habe mir auch erst vor ein paar Tagen das installiert: http://www.autoitscript.com/forum/index.php?app=core&module=attach&section=attach&attach_app=core&module=attach&section=attach&attach_id=29947
    Das Tool sgat dir was fehlt oder was zuviel ist und bereinigt das bei Bedarf gleich mit

  • Schau dir mal

    [autoit]


    GUICtrlCreatePic
    InetGet

    [/autoit]

    an :) damit sollte dein Problem zu Lösen sein

    Gruß

  • danke aber wie mache ich es, dass er immer das bild lädt welches er grade angeklickt hat?

    Also ich hab tp1 an er soll vorschau 1 laden
    ich hab tp2 an er soll vorschau 2 laden

  • Lass eine Funktion in einer Schleife laufen die schaut welches Item ausgewählt ist und anhand des ausgewählten items erstellt sie die Vorschau und löscht sie ggf wieder wo ist das Problem?

  • Habe dir mal WM_Notify eingebaut, teste mal und achte auf den index, ich denke das sollte dir schonmal weiterhelfen

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    #include <GuiImageList.au3>
    #include <ListViewConstants.au3>
    #include <ProgressConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    $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"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $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)

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]
  • Hier braucht's keine Schleife.

    Spoiler anzeigen
    [autoit]


    #region - Timestamp
    ;2011-12-01 15:46:09
    #endregion - Timestamp

    [/autoit] [autoit][/autoit] [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    #include <GuiImageList.au3>
    #include <ListViewConstants.au3>
    #include <ProgressConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $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

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $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)
    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)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    $hWndListView = $hListView
    If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)

    [/autoit] [autoit][/autoit] [autoit]

    $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_CLICK
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    ConsoleWrite("lade Bild für Index " & DllStructGetData($tInfo, "Subitem") & @CRLF)
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

    [/autoit]


    Weis den Einträgen irgendwie zum Skriptstart die passenden Bilder zu und entscheide dann an Stelle des Consolewrite(), welches geladen werden soll.

  • Und wo füge ich das bild ein?

    Achja und In den Credits kommt jeder rein der mir geholfen hat, also fleißig helfen! :D

  • wie wärs damit?

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    #include <ListViewConstants.au3>
    #include <StructureConstants.au3>
    #include <WindowsConstants.au3>
    #include <Array.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $created = 0, $ID
    Global $Pic, $Label, $Packname = 'nochkeins'
    Global $hListView
    Dim $aArray[3][5]=[['Texturenpack1','http://www.planetminecraft.com/download.php?file=%2Fhome%2Fplanetmi%2Fpublic_html%2F%2F%2Ffiles%2Fresource_media%2Ftexture%2FSOI+5th_927480.zip&name=SOI%205th_927480.zip','32x32','20 MB','/vorschau1.jpg'],['Texturenpack2','http:dllink2\.exe','64x64','20 MB','/vorschau2.jpg'],['Texturenpack3','http:dllink3\.exe','64x64','20 MB','/vorschau3.jpg']]
    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
    ;_ArrayDisplay($aArray)
    If FileExists(@TempDir&'/vorschau1.jpg') = 0 Then
    InetGet('http://www.pixey.de/wp-content/uploads/2007/07/texturmauer.jpg',@TempDir&'/vorschau1.jpg',0)
    ElseIf FileExists(@TempDir&'/vorschau2.jpg') = 0 Then
    InetGet("http://h3.abload.de/img/minecraftlogovwfaf.jpg", @TempDir&'/vorschau2.jpg',0)
    ElseIf FileExists(@TempDir&'/vorschau3.jpg') = 0 Then
    InetGet('http://www.designersfondcollection.de/bild.aspx?id=122&G=32768',@Tempdir&'/vorschau3.jpg',0)
    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $GUI = GUICreate("Downloader", 547, 470)
    Global $Processbar = GUICtrlCreateProgress(24, 392, 497, 25)
    $Group1 = GUICtrlCreateGroup("Vorschau", 24, 112, 497, 257)
    $Button1 = GUICtrlCreateButton("Donate", 128, 430, 65, 25, $WS_GROUP)
    $Group1 = GUICtrlCreateGroup("Vorschau", 24, 112, 497, 257)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button2 = GUICtrlCreateButton("Download", 24, 430, 97, 25, $WS_GROUP)
    ;$Label3 = GUICtrlCreateLabel("# %", 256, 424, 30, 17, $SS_SUNKEN)
    _createListView()
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    Func _createListView()
    Global $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)

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 0 To UBound($aArray) -1
    _GUICtrlListView_AddItem($hListView, $aArray[$i][0], 0)
    _GUICtrlListView_AddSubItem($hListView, $i, $aArray[$i][2], 1)
    _GUICtrlListView_AddSubItem($hListView, $i, $aArray[$i][3], 2)
    Next
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    MsgBox(1,"Donation","Gibts Nicht :D")
    Case $Button2
    _download($ID)

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _download($ID)
    GUICtrlSetState($Button2,$GUI_DISABLE)
    $hFileSize = InetGetSize($aArray[$ID][1])
    $Anzeige = Round($hFileSize / 100,-1) ; auf ganze Zahl runden
    $hDownload = InetGet($aArray[$ID][1],@DesktopDir& '\' & $aArray[$ID][0]&'.zip',0,1)
    do
    $aData = InetGetInfo($hDownload)
    GUICtrlSetData($Processbar,Round($aData[0]*100/$aData[1],-1))

    [/autoit] [autoit][/autoit] [autoit]

    Until InetGetInfo($hDownload,2) ; Download fertig
    MsgBox(0,"Download Abgeschlossen","Der Download von"&$aArray[$ID][0]&" ist abgeschlossen")
    GUICtrlSetData($Processbar,'')
    GUICtrlSetState($Button2,$GUI_ENABLE)
    InetClose($hDownload)

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc
    Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    $hWndListView = $hListView
    If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)

    [/autoit] [autoit][/autoit] [autoit]

    $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_CLICK
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    $ID = DllStructGetData($tInfo, "Subitem")
    _createImage(DllStructGetData($tInfo, "Subitem"))
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

    [/autoit] [autoit][/autoit] [autoit]

    Func _createImage($lvSubID)
    If $created = 1 Then
    GUICtrlDelete($Pic)
    GUICtrlDelete($Label)
    $created = 0
    Endif
    If $created = 0 Then
    $Pic = GUICtrlCreatePic(@TempDir&$aArray[$lvSubID][4],40,140,460,200)
    $created = 1
    Endif

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]