Re: linked images in Quark docs
Re: linked images in Quark docs
- Subject: Re: linked images in Quark docs
- From: Hans Haesler <email@hidden>
- Date: Fri, 14 Mar 2003 09:45:04 +0100
On Thu, 13 Mar 2003, Wallace, William wrote:
>
Does anybody (Shane... Hans... ) know a way to update modified images in a
>
quark document via Applescript?
Hi Bill,
Shane has given you the outlines of two possible solutions but I guess
that you'd like to see some code. ;-)
I have scripts which loop through the picture boxes, store the
properties of the image, import the image and re-apply the stored
properties. This is quite fast. But it happens that an error occurs,
e.g. when an image has been rotated and pushed, manually, so far
that restoring the offset values by script isn't possible.
Therefore, I prefer the somewhat slower but most reliable way: open
the document twice. The first time with 'do auto picture import no'
just for storing the value of the 'Auto Picture Import' property and
changing it to "yes". The document is saved and opened, again. This
time the images are relinked, automatically. The 'Auto Picture Import'
is reset to the stored value, the document is saved and closed.
This script will prompt you for selecting an XPress document. Choose
one which has 'modified' images.
---
set docPath to (choose file with prompt "Select a QuarkXPress document:" of type "XDOC")
tell application "QuarkXPress 4.11"
activate
open docPath use doc prefs yes remap fonts no do auto picture import no
tell document 1
set autoPicture to auto picture import
set auto picture import to auto import on
end tell
close document 1 saving yes
open docPath use doc prefs yes remap fonts no do auto picture import yes
tell document 1
set auto picture import to autoPicture
end tell
close document 1 saving yes
end tell
---
If you'd like to update the images of a document which is already open
then the beginning must be modified like this:
---
tell application "QuarkXPress 4.11"
activate
tell document 1
set docPath to (get file path)
set autoPicture to auto picture import
-- and so on
---
The first script can be modified to be used as a droplet. If you'd like
to have it or if you'd like to see a script which stores and re-applies
the properties then please send me a message.
BTW, with QuarkXPress 5.0 you don't need a script: select all lines in the
"Missing/Modified Pictures" window (or in the "Usage" window), hold down the
Option key, click "Update", let go the Option key and XPress does the job.
BUT: with version 5.01 this trick doesn't work anymore.
---
Hans Haesler <email@hidden>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.