Okay, I generated an ‘error’ in filemaker, and I want to automate clicking “OK”.
For anyone who wants to attempt to replicate the test, open filemaker pro (I’m using 10v3) and click so no fields are selected, then try and type a or something. You’ll get a “Before typing, press Tab…” etc error.
System Events works, as I have turned on universal access.
At the moment, I’ve tried:
tell application "System Events"
tell process "FileMaker Pro"
click button "OK" of front window
end tell
end tell
However, it doesn’t appear that the error is regarded as a window. If I try and get the name of the front window, it times out while waiting for FMP. If I run the above script, it doesn’t do anything.
In Applescript you can create a dialog, surely you can interact with one?
How can I tell Applescript to tell filemaker to click okay, if an error dialog appears?
It appears the window doesn’t have a name.
Which is weird.
It’s a window, it’s parent is a window, but it doesn’t have a window name.
It’s role is window
it’s description is “dialog”
It’s subrole is “Dialog”
It has 3 children.
Main is true
And it’s default button is the Button “OK”
Hmm, so should I try calling window 1 or something?