Hallo Edgar,
Gratulation!
Ich hatte es auch mit dem ersten Teil Deiner Lösung versucht. Doch es kam mir nicht in den Sinn, dass das Updaten des Links das gewünschte Ergebnis bringen könnte.
Es funktioniert. Aber ... wenn dasselbe Bild ein zweites Mal importiert wird, dann klappt es nicht mehr. Weshalb kann ich nicht sagen.
Mögliche Abhilfe: Das Updaten aller gleichnamigen Links.
---
tell document 1 of application "Adobe InDesign CS3"
set AlphaCh to "Alpha 1"
activate
set filePath to (choose file) as Unicode text
place file filePath on selection with properties ¬
{image IO preferences:{alpha channel name:AlphaCh}}
set LinkName to name of item link of graphic 1 of selection
update (every link whose name is LinkName)
end tell
---
Doch besser wäre, nicht den Namen, sondern den ganzen Link zu verwenden. Dann muss nur das aktuelle Bild aufgefrischt werden:
---
tell document 1 of application "Adobe InDesign CS3"
set AlphaCh to "Alpha 1"
activate
set filePath to (choose file) as Unicode text
place file filePath on selection with properties ¬
{image IO preferences:{alpha channel name:AlphaCh}}
set curLink to item link of graphic 1 of selection
update curLink
end tell
---
Gruss, Hans
als Antwort auf: [#422741]