I’m trying to write a macro for exporting a Keynote slide. My macro invokes the File | Export To | Movie menu function, fills out the dialog box, and then presses Enter. That all works fine. But then Keynote displays a dialog box for the user to enter a file name. This is where I’m struggling.
I want the macro to pause and wait for the user to name the file. Once he’s done that, he will then either (a) press Enter or (b) click on the Export button to finish his input. If the file already exists, Keynote will prompt him to Cancel or Replace the file. I want the program to wait for the user to respond and then proceed accordingly.
Regardless of the option he chooses (Cancel or Replace), I want the macro to complete one more action before he finishes (e.g., delete a slide).
Because Keynote does not assign a name to the Export window, I can’t simply wait until the Front Window is not, for example, "Export.”
How can I do this?