I’m writing a script in which the user selects a PDF, and a PitStop preflight is run on the PDF. Unfortunately, I’m doing something wrong. Here’s the code snippet:
if user_choice is "NL issue PDF" then tell application "Adobe Acrobat 7.0 Professional" activate choose file with prompt "Please select the locked issue PDF." delay 3 tell application "System Events" tell process "Acrobat" -- GUI Scripting statements: click menu item "Execute Enfocus QuickRun: Check Security" of menu 1 of menu item "Enfocus QuickRuns" of menu 1 of menu item "Enfocus PitStop Professional" of menu 1 of menu bar item "Plug-Ins" of menu bar 1 end tell end tell end tell
The problem is this: it prompts the user to select a file, but doesn’t open it. If a file is already open in Acrobat, it will happily run the preflight on the open file. (The whole click menu item line selects the menu item for running the prelight.) I tried putting in a delay, thinking maybe it was running the preflight before the user-selected file had a chance to open, but it doesn’t seem to help.
Browser: Safari 419.3
Operating System: Mac OS X (10.4)