detto
Aktives Mitglied
Thread Starter
- Dabei seit
- 22.08.2007
- Beiträge
- 3.182
- Reaktionspunkte
- 263
Au weia,.. schon spät geworden....
Nunja,....
Ich probier mich gerade an nem Docklet für Rar-Dateien, zum Entpacken.
So weit bin ich schon gekommen:
Code:
on open theFiles
repeat with i from 1 to number of items of theFiles
set curFile to item i of theFiles
set CWD to POSIX path of ((path to curFile) as alias)
display dialog "Passwort:" buttons {"OK"} default answer "" default button "OK"
set thePassword to text returned of the result
--
try
if thePassword is "" then
do shell script "cd '" & CWD & "' && unrar x '" & curFile & "'"
else
do shell script "cd '" & CWD & "' && unrar x -p'" & thePassword & "''" & curFile & "'"
end if
display dialog "Entpackvorgang erfolgreich"
on error
display dialog "Abgebrochen durch Fehler"
end try
--
end repeat
end open
Wenn jetzt eine Datei auf das Docklet fallen gelassen wird, öffnet sich folgende Fehlermeldung: http://xs225.xs.to/xs225/08113/bild_1588.png
Aber laut Zeile 4 wird doch korrekt in den POSIX Pfad umgewandelt?