Hallo Uwe,
gut. In diesem Fall ist die Änderung recht einfach. Die einzelnen Elemente des Pfades sind mit Doppelpunkten
abgegrenzt. Deshalb werden die 'text item delimiters' von AppleScript zuerst auf {":"} gesetzt. Zum Entfernen
des "layouts"-Ordners setzt man den Pfad neu zusammen. Man nimmt dazu die Elemente 1 bis -3 (also vom
ersten bis zum drittletzten) und das Element -1 (der Bildname):
Nach dem Ende der Repeat-Schleife werden die 'text item delimiters' wieder auf {""} zurückgesetzt. Die Änderung
betrifft nur das Script-Objekt "copyImages". Bitte ersetze dieses im Script durch den folgenden Code:
---
script copyImages
global imageList
set imageList to {}
tell application "QuarkXPress 6.1"
activate
open alias filePath use doc prefs yes remap fonts no do auto picture import no
set AppleScript's text item delimiters to {":"}
tell document 1
repeat with i from 1 to count of picture boxes
set curPath to (file path of image i) as string
if curPath ends with "FS05" then
set finePath to ¬
((text items 1 thru -3 of curPath) & (text item -1 of curPath)) as string
set end of imageList to finePath
end if
end repeat
end tell
set AppleScript's text item delimiters to {""}
end tell
if imageList is not {} then
tell application "Finder" to activate
repeat with i from 1 to count of imageList
try
tell application "Finder" to duplicate file (item i of my imageList) to ¬
folder targetFolder with replacing
end try
end repeat
end if
tell application "QuarkXPress 6.1"
close document 1 saving no
end tell
end script
---
Hans Haesler <hsa@ringier.ch>