• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Automated input Quark X Press with Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Automated input Quark X Press with Applescript
      • From: Hans Haesler <email@hidden>
    • Re: Automated input Quark X Press with Applescript
      • From: Simon Forster <email@hidden>
  • Prev by Date: Brad D Gourley/US/DNY is out of the office.
  • Next by Date: Concierge
  • Previous by thread: Error 19005 when saving quicktime movie
  • Next by thread: Re: Automated input Quark X Press with Applescript
  • Index(es):
    • Date
    • Thread