Subject: | |
From: | |
Reply To: | |
Date: | Wed, 22 Aug 2007 17:10:21 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I am trying to update an OS 9 script for Quark to use in OS X. I think I
have the general idea down, but I know I am missing a few details. This
script is supposed to check for images that are out of the 85-100% range and
drop them into a sub-folder to correct. I have it working to the point of
getting the Quark files and opening, then closing. What I am having trouble
with is getting the script to communicate to the Finder that a new folder
needs to be created if the files are out of the range. I am also having
trouble updating the syntax to get the scale of the images in picture boxes.
If anyone has a bit of guidance, I would really appreciate it.
thanks,
Levon
[applescript]
(**
This script does the following:
Open a folder and check the contents for Quark files
See if any art placed in picture boxes in Quark is less than 85% or greater
than 100%
Close without saving
Place these items in a sub-folder to manually correct
**)
set FileSample to choose folder
set folderName to name of (info for FileSample)
tell application "Finder" to set theFiles to files of folder FileSample
whose name extension is in {"qxd"} or kind contains "QuarkXPress" or file
type is in {"XPRJ", "XPR3"}
repeat with oneFile in theFiles
tell application "QuarkXPress"
activate
open (oneFile as alias)
tell front document
set docName to name
repeat with i from 1 to count of picture boxes
try
set theScale to scale of image 1 of picture box i as
list
set thisScale to (item 1 of theScale)
set imagePath to file path of image 1 of picture box i
set imageName to my pathName(imagePath)
if thisScale as real is less than "85" or thisScale as
real is greater than "100" then
tell application "Finder"
(move oneFile to folder) make new folder at
folderName with properties {name:"Incorrectly Scaled Files"}
end tell
display dialog "There are files out of scale range
in the folder 'Incorrectly Scaled Files.' Please manually fix the files and
then re-run this script."
end if
end try
end repeat
close saving no
end tell
end tell
end repeat
[/applescript]
Levon Spradlin
Desktop Publishing Technology Manager, Assessment & Information
Pearson
512-989-5300 x 3989
[log in to unmask]
****************************************************************************
This email may contain material confidential to
Pearson. If you were not an intended recipient,
please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************
|
|
|