I need to script Acrobat to open its page setup dialog, have a user change it (or not), and press OK, then have Acrobat open its print dialog. I need to use GUI scripting on it, but how can I make the first dialog box wait for its OK/cancel buttons to be pressed before it goes on to the print dialog? As I have it, it sends the command immediately and won’t show the print dialog unless i put in a hard delay of some seconds… Is there a way to make it wait for the first dialog to be dismissed?
tell application “System Events”
tell process “Acrobat 6.0.2 Professional”
keystroke “p” using {command down, shift down}
end tell
end tell
tell application “System Events”
tell process “Acrobat 6.0.2 Professional”
keystroke “p” using {command down}
end tell
end tell