Specifications
return scriptResult
end run
Command script: reverse page order in a document
To reverse the page order in a document, specify the following as a custom "command" script.
The script doesn't use any arguments.
on run {args}
set scriptResult to "/OK/"
tell application "QuarkXPress"
try
if not (exists document 1) then error "No open document"
tell document 1
set pageCnt to count of page
if pageCnt is not equal to 1 then
repeat with i from 1 to pageCnt
move page pageCnt to before page i
end repeat
end if
end tell
on error errmsg number errnum
set scriptResult to ("/ERROR/:" & errmsg)
end try
end tell
return scriptResult
end run
Save as script: save as multi-file DCS
To save a document as multi-file DCS, specify the following as a custom "save as" script (using
a compiled script). The script uses the first argument to specify the color setup ("Grayscale",
"Composite RGB", "Composite CMYK", "Composite CMYK andSpot", "As Is").
on run {args}
set theOutputSetup to arg1 of args
set theResultJobPath to "/ERROR/:Unknown error"
using terms from application "PowerSwitch_Service"
tell application (server of args)
try
set theJob to jobobject of args
set theJobProper to proper name of theJob
set theResultJobPath to create path theJob name theJobProper with creating folder
on error errmsg number errnum
set theResultJobPath to ("/ERROR/:" & errmsg)
return theResultJobPath
end try
end tell
end using terms from
tell application "QuarkXPress"
try
if not (exists document 1) then error "No open document"
tell document 1
set pageCnt to count of pages
repeat with i from 1 to count of pages
-- Create the sequential number for the file
set fileNum to i
repeat until (length of (fileNum as text)) = (length of (pageCnt as text))
set fileNum to "0" & fileNum
end repeat
set FileName to theJobProper & "_" & fileNum & ".eps"
set theResultPath to theResultJobPath & ":" & FileName
save page i in theResultPath EPS format Multiple File DCS EPS data binary EPS
scale 100 Output Setup theOutputSetup with transparent page
end repeat
208
Enfocus Switch 10