Hallo Leute,
hab nun mein Array soweit das es mir die Werte, verbunden mit den zugehörigen Werten in der Tabelle, so ausgibt wie ich es haben will.
Jedoch brauche ich nochmal eure Hilfe... Wie kann ich nun die letzte spalte in meinem Array, welche mit ArrayDisplay dargestellt wird, so entfernen das die vorherigen Daten so stehen bleiben wie sie sind
Hier mal der Code:
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
$Form1 = GUICreate("Form1", 820, 443, -1, -1)
$Liste = GUICtrlCreateListView("Pos.|T1|T2|T3|T4|T5|||", 20, 133, 780, 300, BitOR($LVS_REPORT, $LVS_EDITLABELS, $WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE))
GUICtrlSetResizing(-1, $GUI_DOCKALL)
_GUICtrlListView_SetColumnWidth($Liste, 0, 130)
_GUICtrlListView_SetColumnWidth($Liste, 1, 80)
_GUICtrlListView_SetColumnWidth($Liste, 2, 80)
_GUICtrlListView_SetColumnWidth($Liste, 3, 80)
_GUICtrlListView_SetColumnWidth($Liste, 4, 80)
_GUICtrlListView_SetColumnWidth($Liste, 5, 80)
_GUICtrlListView_SetColumnWidth($Liste, 6, 80)
_GUICtrlListView_SetColumnWidth($Liste, 7, 80)
_GUICtrlListView_SetColumnWidth($Liste, 8, 80)
_GUICtrlListView_SetExtendedListViewStyle($Liste, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_DOUBLEBUFFER))
GUICtrlCreateListViewItem("A" & "|" & 225 & "|" & 355 & "|" & 400 & "|" & 102 & "|" & 100 & "|" & 50, $Liste)
GUICtrlCreateListViewItem("B" & "|" & 325 & "|" & 278 & "|" & 400 & "|" & 207 & "|" & 366 & "|" & 50, $Liste)
GUICtrlCreateListViewItem("C" & "|" & 425 & "|" & 645 & "|" & 500 & "|" & 752 & "|" & 75, $Liste)
GUICtrlCreateListViewItem("D" & "|" & 225 & "|" & 100 & "|" & 786 & "|" & 400 & "|" & 200 & "|" & "|" & 530, $Liste)
GUICtrlCreateListViewItem("E" & "|" & 125 & "|" & 355 & "|" & 900 & "|" & 400 & "|" & 316 & "|" & "|" & 530, $Liste)
GUICtrlCreateListViewItem("F" & "|" & 100 & "|" & 355 & "|" & 786 & "|" & 752 & "|" & 30 & "|" & "|" & 530, $Liste)
GUICtrlCreateListViewItem("G" & "|" & 355 & "|" & 225 & "|" & 120 & "|" & 400 & "|" & 100, $Liste)
GUISetState(@SW_SHOW)
$Button = GUICtrlCreateButton("Stückliste", 350, 60, 120, 25)
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button
arraysearch2()
arraysearch3()
EndSwitch
WEnd
Func arraysearch2()
Global $aListe[1]
$iColumn = _GUICtrlListView_GetColumnCount(GUICtrlGetHandle ($Liste))
$iRow = _GUICtrlListView_GetItemCount(GUICtrlGetHandle ($Liste))
If $iRow > 0 Then
For $i = 0 To $iRow - 1
For $k = 6 To $iColumn -2
$sItem = _GUICtrlListView_GetItemText(GUICtrlGetHandle ($Liste), $i, $k)
For $j = 2 to 2
$sItem2 = _GUICtrlListView_GetItemText(GUICtrlGetHandle ($Liste), $i, $j)
If $sItem <> "" Then
$iArraySearch = _ArraySearch($aListe, $sItem & $sItem2)
If $iArraySearch = -1 Then
ReDim $aListe[UBound($aListe) + 1][4]
$aListe[UBound($aListe) - 1][0] = Int ($sItem2)
$aListe[UBound($aListe) - 1][1] = 1
$aListe[UBound($aListe) - 1][2] = Int ($sItem)
$aListe[UBound($aListe) - 1][3] = Int ($sItem & $sItem2)
Else
$aListe[$iArraySearch][1] += 1
EndIf
EndIf
Next
Next
Next
_ArraySort($aListe, 0, 0, 0, 0)
_ArrayDisplay($aListe,0)
$aListe=""
EndIf
EndFunc
Func arraysearch3()
Global $aListe[1]
$iColumn = _GUICtrlListView_GetColumnCount(GUICtrlGetHandle ($Liste))
$iRow = _GUICtrlListView_GetItemCount(GUICtrlGetHandle ($Liste))
If $iRow > 0 Then
For $i = 0 To $iRow - 1
For $k = 7 To $iColumn -1
$sItem = _GUICtrlListView_GetItemText(GUICtrlGetHandle ($Liste), $i, $k)
For $j = 3 to 3
$sItem2 = _GUICtrlListView_GetItemText(GUICtrlGetHandle ($Liste), $i, $j)
If $sItem <> "" Then
$iArraySearch = _ArraySearch($aListe, $sItem & $sItem2)
If $iArraySearch = -1 Then
ReDim $aListe[UBound($aListe) + 1][4]
$aListe[UBound($aListe) - 1][0] = Int ($sItem2)
$aListe[UBound($aListe) - 1][1] = 1
$aListe[UBound($aListe) - 1][2] = Int ($sItem)
$aListe[UBound($aListe) - 1][3] = Int ($sItem & $sItem2)
Else
$aListe[$iArraySearch][1] += 1
EndIf
EndIf
Next
Next
Next
_ArraySort($aListe, 0, 0, 0, 0)
_ArrayDisplay($aListe,0)
$aListe=""
EndIf
EndFunc
Danke für jede Hilfe die Ihr mir leisten könnt...