Re: Adobe Acrobat batch process (Newbie)
Re: Adobe Acrobat batch process (Newbie)
- Subject: Re: Adobe Acrobat batch process (Newbie)
- From: Bernard Azancot <email@hidden>
- Date: Wed, 9 May 2007 10:57:52 +0200
Thanks a lot, James.
I'll try this too.
Cheers.
--
Bernard Azancot
email@hidden
Le 9 mai 07 à 01:31, James Nierodzik a écrit :
If you want to do it without Java though you can GUI script it..
not that I would recommend it though :D
set theFolder to choose folder
tell application "Finder" to set theFiles to entire contents of
theFolder
activate application "Adobe Acrobat 7.0 Professional"
repeat with aFile in theFiles
tell application "Adobe Acrobat 7.0 Professional" to open (aFile
as string)
tell application "System Events"
tell process "Acrobat"
delay 1
click menu item "Reduce File Size..." of menu 1 of menu
bar item "File" of menu bar 1
delay 1
click button "OK" of group 1 of window "Reduce File Size"
delay 2
click button "Save" of window "Save As"
delay 1
click button "Replace" of window 1
delay 15
end tell
end tell
tell application "Adobe Acrobat 7.0 Professional" to close all
docs saving "No"
end repeat
On May 8, 2007, at 3:59 AM, Bernard Azancot wrote:
Le 7 mai 07 à 10:28, Rob Stott a écrit :
Personally, I've always found Acrobat a bit light on AppleScript
support. Luckily, you can get a lot more done using JavaScript,
and you can use 'do script' from AppleScript to execute a
JavaScript. I always find it a bit shaky but you can get some
good results with care. Here's a very rough example to get you
started;
on open theFiles
tell application "Adobe Acrobat Professional"
--repeat through the dropped files
repeat with theFile in theFiles
--open the file
open theFile
tell front document
--tell the open document to execute a javascript
do script "app.execMenuItem(\"ReduceFileSize\");"
end tell
close front document saving no
end repeat
end tell
end open
Yes, you're right, Rob. Acrobat AS support is rather poor.
JavaScript does the work.
Thanks a lot, Rob
Cheers
--
Bernard Azancot
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden