Hallo,
habe eine Gui mit einer mit 2 Listview..
Ich exportiere die zweite Listview mit dieser funktion:
Spoiler anzeigen
Func _export()
[/autoit] [autoit][/autoit] [autoit]$hWnd = $Liste
$path = FileSaveDialog('ListView-Export speichern', @ScriptDir, "CSV Datei (*.csv)")
If @error Then Return MsgBox(0, 'Fehler', 'Keine Zieldatei gewählt.')
FileWrite($path & ".csv", _GUICtrlListView_Export($hWnd, 1, ','))
EndFunc
Func _GUICtrlListView_Export($hWnd, $exType = 0, $Delim = Default) ; $exType=0 Array / $exType=1 String
If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
Local $row = _GUICtrlListView_GetItemCount($hWnd)
If $exType Then
If $Delim <> Default Then Local $oldDelim = Opt('GUIDataSeparatorChar', $Delim)
Local $sOut = ''
For $i = 0 To $row - 1
$sOut &= _GUICtrlListView_GetItemTextString($hWnd, $i) & @CRLF
Next
If $Delim <> Default Then Opt('GUIDataSeparatorChar', $oldDelim)
Opt("MustDeclareVars", 1)
Opt("MustDeclareVars", 1)
Opt("MustDeclareVars", 1)
Opt("MustDeclareVars", 1)
Global $countc, $countm, $counts, $Labelhp, $lv3countm
Return $sOut
EndIf
Local $col = _GUICtrlListView_GetColumnCount($hWnd)
Local $aOut[$row][$col]
If $col = 1 Then
ReDim $aOut[$row]
For $i = 0 To UBound($aOut) - 1
$aOut[$i] = _GUICtrlListView_GetItemText($hWnd, $i)
Next
Return $aOut
EndIf
For $i = 0 To UBound($aOut) - 1
For $j = 0 To UBound($aOut, 2) - 1
$aOut[$i][$j] = _GUICtrlListView_GetItemText($hWnd, $i, $j)
Next
Next
Return $aOut
EndFunc
Und jetzt zu meinem Problem:
Ich möchte nur die Exportieren wo Type Fixed ist.
weiss aber nicht wie?
Und beim Export würde ich gerne die Labels von der lisview mit exportieren Wie mache ich das :
also dieses:Hostname,LW,Type....
Kann mir da jemand helfen??
Danke
SubZero