Subject: | |
From: | |
Reply To: | |
Date: | Fri, 24 Aug 2007 10:29:20 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Lloyd,
I am debugging the script right now and run into values being returned
that don¹t read right to me. When I get to the ³set thisScale to (item 1 of
theScale)³ line, I get ³scale of image 1 of picture box 1 of picture box 1
of document 1 of picture box 1 of document 1 of application "QuarkXPress"²
returned as a value.
This is the point where I am erroring out right now. Setting this value
does not make sense to me. When I call up this line in ³if thisScale as real
is less than "85" or thisScale as real is greater than "100" then² I get
³Can't make «class pscl» of «class IMAG» 1 of «class PICB» 1 of «class PICB»
1 of document 1 of «class PICB» 1 of document 1 of application "QuarkXPress"
into type real.² returned as a value and the error stops the script.
Here is the current script, v4.2.2:
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 the current view scale of this document to fit in window
set view scale to 100
--set docName to name
repeat with i from (count of picture boxes) to 1 by -1
tell picture box i
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"
--Does folder exist? -No
make new folder at folder folderPATH with
properties {name:"Incorrectly Scaled Files"}
--If not, then create it
move oneFile to folder "Incorrectly Scaled
Files"
--Move files that are out of range to the folder
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 tell
end repeat
close saving no
end tell
end tell
end repeat
Let me know what you think, maybe where I am using incorrect syntax causing
this oddly formatted result to be returned.
Thanks,
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.
****************************************************************************
|
|
|