Click Dialog button

Hi there.

I am after some help with selecting some options in a dialog box and clicking a button.

So I have the dialog window up and I want to click the Export button which is button 2 of window 1. I am using the script below, but not getting a result.

"click button 2 of window 1

I am also trying to untick some default items in the dialog box.

So for instance when you open up the dialog box by default a menu item called “Export patterns at on-screen resolution” is ticked which is a check box. I want to deslect it so I was trying the following

click checkbox 5 of window 1
click checkbox "Export patterns at on-screen resolution" of window "Export PDF"

but neither seem to work.

Any help would be appreciated.


GUI script depends highly on the application and the settings, the developer made in Interface Builder.

Same hint as some days ago: Use an UI element inspector to find the proper reference

Just rechecking my work.

It seems that the click of the export button does happen, but the window does not seem to respond to it. I can see the button highlight when it performs the click.

I was using the demo of UI Browser to find the names of the buttons.