Hallo liebe AutoIT User ich breuchte noch mal eure Hilfe.
Ich bastel grade an einer Plylist.xspf dies ist eine playlist für den xspf player für webseiten.
ich habe ihn schon zu 90% fertig doch habe eine schweche und das ist array.
Spoiler anzeigen
#include <Array.au3>
$anzahl = ""
$seite = 'http://www.psp-praxis.mine.nu/Musik/'
$message = "Wähle die Musik aus."
$sSelect = FileOpenDialog($message, 'C:\xampp\htdocs\Musik', '(*.mp3)',4)
$arSelect = StringSplit($sSelect, '|')
If FileExists ("c:\Playlist.xspf") Then
FileDelete ("c:\Playlist.xspf")
Sleep (1000)
EndIf
$file = FileOpen("c:\Playlist.xspf", 1)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
FileWrite($file, '<?xml version="1.0" encoding="UTF-8"?>'& @CRLF)
FileWrite($file, '<playlist version="0" xmlns = "http://xspf.org/ns/0/">'& @CRLF)
FileWrite($file, '<trackList>'& @CRLF & @CRLF)
For $i = 1 to $arSelect [0]
FileWrite($file, '<track>'& @CRLF)
FileWrite($file, '<location>'& $seite & $arSelect [$i]&'</location>' & @CRLF)
FileWrite($file, '<annotation>'& $arSelect [$i]&'</annotation>' & @CRLF)
FileWrite($file, '</track>'& @CRLF & @CRLF)
Next
FileWrite($file, '</trackList>'& @CRLF)
FileWrite($file, '</playlist>'& @CRLF)
FileClose($file)
MsgBox (0,"Fertig", "Playlist erstelt.",10)
Mein problem ist $arSelect[1] das muss raus aber dann schmiert mein Array am ende ab weil er in der letzten zelle ja nichts findet. Was muss ich machen da mit er $arSelect[0] um einen veringert und $arSelect[1] raus schmeist. Es wäre super lieb von euch wenn ihr mir weiter hlefen köntet.