Hey
Da ich für eine Mac Umsetzung von HearTheRadio plist brauche, bín ich gerade dabei, die plist in ini zu konvertieren. Hier mein Script:
Spoiler anzeigen
$Open = FileOpen( "Stations.plist", 128)
$Text = FileRead( $Open)
MsgBox( 0, "", $Text)
$Text = StringTrimLeft( $Text,200)
$Text = StringTrimRight($Text,27)
FileWrite( "Cache", $Text)
$Zeilen = _FileCountLines( "Stations.plist")
MsgBox( 0, "", $Text)
_FileReadToArray( "Cache", $array)
MsgBox( 0, "Text", $array[1] & "=" & $array[2] & @CRLF & $array[3] & $array[4] & @CRLF & $array[$array[0]])
$Percent = 100 / $Zeilen
ProgressOn( "Working...", "We are working...")
For $i = 1 To $Zeilen Step 1
ProgressSet( $Zeilen * $Percent)
$Line_Text = StringStripWS( $array[$i],8)
$Line_TextSplit = StringReplace( $Line_Text, "<key>", "")
$Line_TextSplit = StringReplace( $Line_TextSplit, "</key>", "")
_FileWriteToLine( "Cache.txt", $i,$Line_TextSplit)
$Line_TextSplit = StringReplace( $Line_TextSplit, "<string>", "")
$Line_TextSplit = StringReplace( $Line_TextSplit, "</string>", "")
_FileWriteToLine( "Cache.txt", $i,$Line_TextSplit)
Next
ProgressOff()
MsgBox( 0, "FERTIG!", "FERTIG!")
Das Problem ist, dass nur folgendes rauskommt:
Spoiler anzeigen
StreamStation
http://streamUrl.com
StreamStation2
http://streamUrl2.com
StreamStation3
http://streamUrl3.com
StreamStation4
http://streamUrl4.comStreamStation
http://streamUrl.com
StreamStation2
http://streamUrl2.com
StreamStation3
http://streamUrl3.com
StreamStation4
http://streamUrl4.comStreamStation
http://streamUrl.com
StreamStation2
StreamStation2
<string>http://streamUrl.com</string>
<string>http://streamUrl4.com</string>StreamStation
StreamStation4
<string>http://streamUrl3.com</string>
StreamStation3
<string>http://streamUrl2.com</string>
StreamStation2
<string>http://streamUrl.com</string>
<string>http://streamUrl4.com</string>StreamStation
StreamStation4
<string>http://streamUrl3.com</string>
StreamStation3
<string>http://streamUrl2.com</string>
StreamStation2
<string>http://streamUrl.com</string>
StreamStation
Alles anzeigen
Hier die plist:
Spoiler anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Stations</key>
<dict>
<key>StreamStation</key>
<string>http://streamUrl.com</string>
<key>StreamStation2</key>
<string>http://streamUrl2.com</string>
<key>StreamStation3</key>
<string>http://streamUrl3.com</string>
<key>StreamStation4</key>
<string>http://streamUrl4.com</string>
</dict>
</dict>
</plist>
Alles anzeigen
Gibt es eventuell eine plist UDF? Habe nämlich keine gefunden...
Danke für die Hilfe!
MFG