I'm getting an error -1700 Can't make data if I drag documents to this droplet but if I run it within Script debugger is OK. I have the feeling that the line that says:
set openedFile to open (currentFile as alias)
is the one causing the error but I'm not sure can someone advise me.
(Quark 7.5-macIntel 10.5.6)
-- This droplet processes files dropped onto the applet
on run
display dialog "To use this script, drag Quark files to this icon"
end run
on open thisItems
repeat with currentFile in thisItems
tell application "QuarkXPress"
activate
try
tell document 1
set openedFile to open (currentFile as alias)
set DocName to name as Unicode text
--set FilePath to "X-Files: PDF Stills: Resort Directory for Press:In:" & DocName & ".ps"
set FilePath to "Scratch:PDF_Stills:Screen:In:" & DocName & ".ps" as Unicode text
set pagewidth to page width as number
set pagewidth to (pagewidth + 1)
set pageheight to page height as number
set pageheight to (pageheight + 1)
end tell
tell print setup of document 1
set printer type to "AdobePDF 8.0"
set paper size to "Custom"
set paper width to pagewidth
set paper height to pageheight
set orientation to portrait
set page position to center horizontal
set print spreads to false
set reduce or enlarge to "100%"
set registration marks to centered
set registration marks offset to "12 pt"
set bleed to ".5"
set output setup to "Composite CMYK"
set separation to false
end tell
print document 1 PostScript file {FilePath}
delay 5
close document 1 saving no
on error the error_message number the error_number
set the error_text to "Error: " & the error_number & ". " & the error_message
beep 4
display dialog the error_text buttons {"OK"} default button 1
return the error_text
end try
end tell
end repeat
end open