Has anyone written a script to have Quark Express 4.x automatically export PDF’s?
Give this a try…
on run
tell application "Finder"
set theList to selection
if (count items in theList) = 1 then
if class of item 1 of theList is application file then
if name of (info for (theList as alias)) is "Make Distiller Input" then
set theList to {}
end if
end if
end if
end tell
MakeDistillerInput(theList)
end run
on open theList
MakeDistillerInput(theList)
end open
on MakeDistillerInput(theList)
try
set outfile to new file with prompt "Save as?" default name "Distiller Input.ps"
on error
return
end try
try
set outref to (open for access outfile with write permission)
on error msg
display dialog msg buttons "Cancel"
return
end try
write "%!" & return & ¬
"/prun {/mysave save def dup = flush RunFile clear cleardictstack mysave restore} def" & ¬
return & return to outref
tell application "Finder"
repeat with x in theList
if file type obsolete of x is "TEXT" then
write ("(" & x as text) & ") prun" & return to outref
end if
end repeat
write return & "%EOF" & return to outref
end tell
close access outref
activate application "Acrobat™ Distiller™ 4.0"
end MakeDistillerInput
Hope this helps!
I tried this but it hangs repeatedly on the following line:
tell app "Finder"
. I’m running Applescript 1.4.3 on a PowerMac G3 with OS 9 & Acrobat 4.0. I don’t understand what’s going wrong. Any hints?