Hallo Jörg,
der Rat von TMA ist richtig. Aber damit es klappt, musst Du auch einen Zielort für die konvertierten Dateien
angeben. Und einen Namen für das Dokument. Und wenn der Quellpfad nur mit "Applications" beginnt, wird dieser
Ordner nicht gefunden. Das öffnen in InDesign sollte in einen 'try'-Wickel gepackt werden. Und zuvor sollte auch
der Dateityp getestet werden. Kann natürlich entfallen, wenn nur XPress-Dateien in den Hotfolder gelegt werden.
---
property quellpfad : (path to applications folder as Unicode text) & "QXD_to_Indd:Eingang:"
property zielpfad : (path to applications folder as Unicode text) & "QXD_to_Indd:Ausgang:"
---------------------------------------------------------------------------------------------------------------------
on idle
set watchlist to (list folder quellpfad)
try
repeat with x in watchlist
set watchfile to quellpfad & x
if x does not start with "." then
checkFileSize(watchfile)
end if
end repeat
end try
return 90
end idle
on checkFileSize(x)
set myStartsize to size of (info for file x)
delay 5
set myEndsize to size of (info for file x)
if myStartsize is myEndsize then
set docName to name of (info for file x)
if docName ends with ".qxd" then
set docName to text 1 thru -5 of docName
end if
tell application "InDesign CS"
activate
open (x as alias)
save document 1 to file (zielpfad & docName & ".indd")
close document 1 saving no
end tell
try
do shell script "rm " & POSIX path of x
end try
else
checkFileSize(x)
end if
end checkFileSize
---
Hier funktioniert es. Habe es allerdings nur mit einer sehr einfachen Datei getestet.
Gruss, Hans
als Antwort auf: [#420756]