Hallo leute kurze frage: wie beweg ich ein array nach unten?
ich hab folgenden code
Case $hUp_Button
$aIndex = _GUICtrlListBox_GetSelItems($mylist)
If $aIndex[0] = 1 Then
; Check if aleady at top
If $aIndex[1] <> 0 Then
; Swap elements
_ArraySwap($gaDropFiles[$aIndex[1]], $gaDropFiles[$aIndex[1] + 1])
; Destroy list
GUICtrlSetData($mylist, "")
; Rewrite list
For $i = 1 To $gaDropFiles[0]
GUICtrlSetData($mylist, $gaDropFiles[$i])
Next
EndIf
EndIf
die funktion ist für objekte nach oben bewegen aber nicht nach unten was mach ich falsch
[autoit]Case $hUp_Button
$aIndex = _GUICtrlListBox_GetSelItems($mylist)
If $aIndex[0] = 1 Then
; Check if aleady at end ( still open )
If $aIndex[1] <> 0 Then
; Swap elements
_ArraySwap($gaDropFiles[$aIndex[1]], $gaDropFiles[$aIndex[1] - 1]) ; dont works all tables are beeing destroyed
; Destroy list
GUICtrlSetData($mylist, "")
; Rewrite list
For $i = 1 To $gaDropFiles[0]
GUICtrlSetData($mylist, $gaDropFiles[$i])
Next
EndIf
EndIf
viellen dank für eure hilfe im vorraus ![]()