Hi,
I’ve created a batch process in Acrobat that consists of cropping pages in a given folder according to certain specifications. It works fine, but I want to know if Applescript can tell Acrobat to run this batch process. I’ve found the file that Acrobat saves for my batch process, but it won’t run if you double-click on it (I figured I could just let a simple Applescript run that file). Is there a way for a script to open up Acrobat and run a batch process? Any help would be most appreciated!
Does this work? (Adjust the paths, of course.)
set acrobat_path to "path:to:acrobat"
set batch_file to "path:to:file"
tell application "Finder" to open {batch_file as alias} using (acrobat_path as alias)
Jon
hey…it didn’t work properly…
it opened up acrobat, but the batch process didn’t run.
Here’s how I altered it…
set acrobat_path to “the beast:applications (mac os 9):adobe acrobat 5.0:acrobat 5.0”
set batch_file to “the beast:documents:acrobat user data:sequences:latest class crop.sequ”
tell application “Finder” to open batch_file as alias using acrobat_path as alias
(I named my computer “The Beast”, by the way…)
Did I by chance do anything to screw up the paths?
Thx!
sorry…the last line is the same as you put it (with the {} brackets for the aliases)…
I don’t know what to tell you. The way I used to do this when I was cropping PDF pages in Acrobat way back when was to use a script to calculate the crop values and open the files then use QuicKeys to open up the crop box and enter the values tabbing trough and keying them as string. Then I would continue with the script, saving the document and moving on to the next file. It wasn’t very fast but it did work. I’m sure there’s also some way to crop suing JavaScript via a “do script” command. There’s probably even a way to get the batch command to execute using the “execute” command which simulates selecting a menu item but I never had good luck with that in Acrobat with submenus. Anyone else have some ideas?
Anyway, good luck with this and let us know if you come up with something.
Jon
you know…i’ve been looking at this app called Prefab Player 1.5.
It supposedly records mouse clicks and keystrokes and scripts it all. I figured since there are no commands for ‘batch processing’ in the Acrobat dictionary that I’d have to do that.
Without this Prefab Player or any other add-one, can you enter a mouse-click command in the script editor with XY coordinates and tell it to click? Just a thought…
thx!
No, in OS 9, you need the addition of something like PreFab player or QuicKeys (as I suggested above) to simulate user interaction with the GUI, it can’t be done with vanilla AppleScript.
Jon
thanks, jon
here’s part of a script i use with my workflow:
-- calls Acrobat to process the pdf files: change them to ps files for distiller
with timeout of 1200 seconds
tell application "Acrobat 5.0"
-- Acrobat will look to the watched folder, "this_folder," and convert the pdf files there into ps files
-- and put those pdf files into Distiller's watched folder
activate
end tell
tell application "System Events" -- gui scripting is used to call the batch converter
tell process "Acrobat 5.0"
tell menu bar 1 -- 'go' to the menu bar
tell menu "File" -- 'pull down' the "File" menu from the menu bar
tell menu item "Batch Processing" -- menu item
tell menu 1 -- the "Batch Processing" sub-menu
click menu item "Batch pdf to ps 1" -- click this sub-menu item; works on a sort of watched folder content
end tell
end tell
end tell
end tell
end tell
end tell
end timeout
hope this helps
Darrick, while helpful if this were in the OS X forum, the thread is about doing this in OS 9.
Thanks,
Jon
thanks for the effort anyways, darrick…
too bad! that sounded like a perfect solution…
i’ll just keep reading and trying to figure it out!
thx!
oops, duh.
unless i’m even more dumb than i used to be, the xml/rss feed i’m seeing in NetNewsWire does not distinguish the os9 and osX fora and i didn’t figure out on my own that this was os9.
(i do find it to be a pretty useful bit of a script though.)
back to my corner…
hmmm…guess i don’t really have any options other than purchasing something like quickkeys…
btw…sorry i haven’t contributed anything to this forum…i’m new to applescript and i keep getting good answers fast on this site…once i know more, i’ll give back…
thx!