Hallo Hans,
habe deinen Bildcheck umgesetzt und es funzt prima. Herzlichen Dank dafür!
Die Anmerkung, dass man die PDF-Dateien label ist nicht so schlecht. Um die jedoch zu realisieren müsst ich das Ergebnis von theProject in eine Variable wandeln, damit ich dieser dann den label index zuweisen kann. Da beiß ich mir gerade etwas die Zähne aus. Deshalb hab ich den ursprünglichen Ansatz, die entsprechenden QXP-Dateien zu färben, umgesetzt.
Hier das vorläufige Script:
on open qxpFiles
set theTarget to choose folder with prompt "Zielordner für PDF-Dateien wählen:"
repeat with aFile in qxpFiles
set filePath to aFile as alias
tell application "QuarkXPress_8_1_6_2_v7"
activate
open filePath
set docName to name of document 1
set theProject to object reference of project 1
set docName to my getName(name of document 1)
--Bildprüfung
tell application "QuarkXPress_8_1_6_2_v7"
set _Pruefung to my _PruefungEbenen({"A_Ebene", "B_Ebene"}) --Die Ebenen: Achtung hier wird eine {Liste } übergeben!
--_Pruefung = false gleich missing or modified link in einer der Ebenen
if _Pruefung is false then tell application "Finder"
set label index of aFile to 2
end tell
end tell
tell application "QuarkXPress_8_1_6_2_v7" -- 1. Durchgang Ebenen ein/ausblenden
activate
tell document 1
set visible of every layer to false --alle Ebenen ausblenden
set visible of layer "A_Ebene" to false --Text_pos ausblenden
set visible of layer "B_Ebene" to true --Text_neg einblenden
set visible of layer "C_Ebene" to false --C_Ebene ausblenden
set visible of layer "Standard" to true --Standard einblenden
end tell
end tell
tell theProject
repeat with i from 1 to count of layout space
try
with timeout of 180 seconds -- = 3 Minuten
export layout space i in (theTarget as string) & docName & "_n.pdf" as "PDF" PDF output style "ZZ_Ausgabestil" --< end timeout
end try
end repeat
end tell
tell application "QuarkXPress_8_1_6_2_v7" -- 2. Durchgang Ebenen ein/ausblenden
activate
tell document 1
set visible of layer "A_Ebene" to true --Text_pos einblenden
set visible of layer "B_Ebene" to false --Text_neg ausblenden
set visible of layer "C_Ebene" to false --C_Ebene ausblenden
set visible of layer "Standard" to true --Standard einblenden
end tell
end tell
tell theProject
repeat with i from 1 to count of layout space
try
with timeout of 180 seconds -- = 3 Minuten
export layout space i in ((theTarget as string) & docName & "_p.pdf") as "PDF" PDF output style "ZZ_Ausgabestil" --< end timeout
end try
end repeat
end tell
tell application "QuarkXPress_8_1_6_2_v7" -- 3. Durchgang Ebenen ein/ausblenden
activate
tell document 1
set visible of layer "A_Ebene" to true --Text_pos einblenden
set visible of layer "B_Ebene" to true --Text_neg einblenden
set visible of layer "C_Ebene" to false --C_Ebene ausblenden
set visible of layer "Standard" to true --Standard einblenden
end tell
end tell
close front document without saving
end tell
end repeat
end open
--Namenskürzung-Routine
on getName(theName)
set {TID, text item delimiters} to {text item delimiters, "."}
if ((count of text items of theName) is greater than 1) and (text item -1 of theName is "qxp") then
set theName to ((text items 1 thru -2 of theName) as text)
return theName
else
return theName
end if
set AppleScript's text item delimiters to TID
end getName
--Bildcheck-Routine
on _PruefungEbenen(_EbenenListe)
set KontrollListe to {}
tell application "QuarkXPress_8_1_6_2_v7"
repeat with i from 1 to count of _EbenenListe
set _EbenenName to item i of _EbenenListe
try
set _C_EbeneListe to ((object reference of every image of every picture box of layer _EbenenName of front document))
repeat with einBild from 1 to count of _C_EbeneListe
set dasBild to item einBild of _C_EbeneListe
if missing of dasBild is true or modified of dasBild is true then
set end of KontrollListe to true
exit repeat
end if
end repeat
end try
end repeat
end tell
if (count of KontrollListe) is greater than 0 then
return false -- =missing or modified link in einer der Ebenen des Durchgangs
else
return true
end if
end _PruefungEbenen
Gruß Uli
P.S.: bei Deinem Bildcheck war ein Schreibfehler drin:
if missing of thePic is true or modifies of thePic is true then
muss es richtig heißen:
if missing of thePic is true or modified of thePic is true then