on open these_items repeat with i from 1 to the count of these_items set this_item to item i of these_items set the item_info to info for this_item set MyTypeIdml to file type of item_info if MyTypeIdml is not "IDml" then display dialog "Bitte nur IDML-Dateien auf das Droplet ziehen." else set ExpandFolderPath to (this_item as string) & "-entpackt" do shell script "mkdir -p " & quoted form of POSIX path of ExpandFolderPath tell application "Finder" to duplicate file this_item to folder ExpandFolderPath with replacing set NewFile to (ExpandFolderPath & ":" & (name of item_info)) as alias do shell script "unzip -o " & quoted form of POSIX path of NewFile & " -d " & quoted form of POSIX path of ExpandFolderPath do shell script "rm " & quoted form of POSIX path of NewFile end if end repeat end open
on open these_items repeat with i from 1 to the count of these_items set this_Folder to item i of these_items if folder of (info for this_Folder) then try alias ((this_Folder as string) & "designmap.xml") on error display dialog ("Der Ordner " & this_Folder as string) & " enthält nicht alle erforderlichen XML-Dateien." & return & "Die IDML-Datei lässt sich eventuell nicht öffnen." giving up after 5 end try set parentfolder to POSIX file ((POSIX path of this_Folder) & "/..") as alias set shellcommand to "ditto -ck --sequesterRsrc " & quoted form of POSIX path of this_Folder & space & quoted form of ((POSIX path of parentfolder) & (name of (info for this_Folder)) & ".idml" as text) do shell script shellcommand else display dialog "Bitte nur Ordner auf das droplet ziehen." end if end repeat end open
| 28.11.2023