Hallo zusammen
Ich bin gerade dabei ein Skript zu schreiben, das aus einem Quark 6.52-Dokument alle Bilder auf 100% skaliert und auf die eingespiegelte Größe beschneidet.
Allerdings macht mir da sowohl Xpress als auch Photoshop als Konsequenz einen strich durch die Rechnung.
d.h. es werden leere Rahmen übergeben obwohl darauf geprüft wird, ich kann es nicht abfangen wenn Bilder so platziert sind das sie nicht sichtbar sind (-> Arbeitsfläche <0) usw.
Hat hier jemand schon was fertiges oder ähnliches?
Mein Skript sieht bis dato so aus:
Code tell application "Finder" set NewFolder to choose folder with prompt "wo sollen die Bilder hin?" tell application "QuarkXPress Passport" activate tell document 1 set numPages to count of every page set imageList to {} repeat with i from 1 to numPages set boxCount to count of every picture box of page i repeat with bx from 1 to boxCount set bxContent to (file path of every image of picture box bx of page i) log bxContent set check to bxContent as string log check if bxContent ≠ null and check is not "null" then set bxScale to (scale of image 1 of picture box bx of page i) as list set bxPercent to (coerce item 1 of bxScale to real) set theBounds to (actual bounds of image 1 of picture box bx of page i) as list set theBoundsX to (coerce item 1 of theBounds to real) set theBoundsY to (coerce item 2 of theBounds to real) set theBounds3 to (coerce item 3 of theBounds to real) set theBounds4 to (coerce item 4 of theBounds to real) set BoxBounds to (bounds of picture box bx of page i) as list set Breite to (coerce item 4 of BoxBounds to real) - (coerce item 2 of BoxBounds to real) set Hoehe to (coerce item 3 of BoxBounds to real) - (coerce item 1 of BoxBounds to real) set theAngle to (angle of image 1 of picture box bx of page i) set theAngle to (coerce theAngle to real) set theAngle2 to (angle of picture box bx of page i) set theAngle2 to (coerce theAngle2 to real) if bxContent is not in imageList then tell application "Adobe Photoshop CS3" open file (bxContent as string) showing dialogs never set docRef to current document if bxPercent ≠ 100 then resize image docRef width (bxPercent) as percent resample method bicubic crop docRef bounds {-(theBoundsX) as millimeters, -(theBoundsY) as millimeters, (-(theBoundsX) + Breite) as millimeters, (-(theBoundsY) + Hoehe) as millimeters} save docRef in NewFolder as TIFF close current document saving no else crop docRef bounds {-(theBoundsX) as millimeters, -(theBoundsY) as millimeters, (-(theBoundsX) + Breite) as millimeters, (-(theBoundsY) + Hoehe) as millimeters} save docRef in NewFolder as TIFF close current document saving no end if end tell end if end if end repeat end repeat end tell end tell beep delay 1 try display dialog "fertig" on error display dialog "fertig mit fehler" end try beep end tell