Automated input Quark X Press with Applescript
Automated input Quark X Press with Applescript
- Subject: Automated input Quark X Press with Applescript
- From: Christopher Pryce <email@hidden>
- Date: Mon, 13 Dec 2004 14:19:03 -0600
I am trying to automate the creation of a catalog page from a directory
of JPEG images from a digital camera.
I've got this simple script which should put each image on a separate
page with the image path as the caption. The pages get created -- yes i
know there is an extra blank page at the end -- but any combination of
ways to access the image have failed. I've verified that the photos and
the enclosing directory exist and a readable/writable by the user
executing the script. The text box below each picture box gets
populated with the correct file path as the caption
The script is below.
set sourcefolder to choose folder with prompt "select folder of images"
as string
set picList to list folder sourcefolder without invisibles
tell application "QuarkXPress"
make new document at beginning
tell document 1
repeat with eachFile in picList
set myFile to (sourcefolder & eachFile)
tell page -1
make picture box at beginning ¬
with properties {bounds:{"1", "1", "3", "3"}}
make text box at beginning ¬
with properties {bounds:{"3.125", "1", "3.5", "3"}}
tell picture box 1
-- this always beeps instead of setting the image
try
-- set image 1 to alias myFile
-- set bounds of image 1 to proportional fit
on error
beep
end try
end tell
tell text box 1
set text 1 to myFile as string
end tell
end tell
make page at end
end repeat
end tell
display dialog "Done." buttons "OK" default button 1 with icon 1
end tell
I realize that the syntax can be shortened. Is there any way to get the
image automatically to the picture box?
Christopher Pryce
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden