On Nov 19, 2003, at 6:14 PM, [EMAIL PROTECTED] wrote:
Confirmed, the finder-script works, but so soes an "Activate" command sent
to InDesign.
But trying to open a document in InDesign fails with an execution error...
Application names are correct, paths are fine, it just doesn't work when
sending it from Revolution :-(
Here is an applescript I wrote to batch convert InDesign files to PDF. I have confirmed it works OK on OS X 10.3 with InDesign 2.0.1. All I can recommend is to inspect the transcript result function after you run the applescript and investigate path name problems.
on mouseup do fld 1 as Applescript end mouseup
-- fld 1 content follows:
--
-- get source folder
--
set this_folder to (choose folder with prompt "Please pick the folder containing the InDesign files to convert to PDF. The InDesign [Screen] style of PDF will be used.") as string
tell application "System Events"
set these_files to every file of folder this_folder
end tell
--
-- get destination folder
--
set dest_folder to (choose folder with prompt "Please pick the destination folder for the PDFs...") as string
--
-- doit
--
try
tell application "InDesign 2.0.1"
activate
end tell
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files as alias)
set this_info to info for this_file
if visible of this_info is true and alias of this_info is false then
-- insert actions here for: this_file
tell application "InDesign 2.0.1"
open this_file
set new_file_name to dest_folder & (the name of this_info) & ".pdf"
tell document 1 to export format PDF type to new_file_name using PDF export style "[Screen]" without showing options
close document 1
end tell -- InDesign
end if
end repeat
on error the error_message number the error_number
display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
end try
Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | <http://mindlube.com>
what a waste of thumbs that are opposable to make machines that are disposable -Ani DiFranco
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
