I'm trying to automate the running of techtools via AppleScript. I have got it working but only with full keyboard access (using tab and space to navigate the UI) but not all machines have this enabled when I first turn them on so I need a way of activating the run check computer.
I assume this is possible with the "click button" function but I cannot work out how to find out which button is which with accessibility inspector. Here is the layout of TechTools and you can see in the bottom left is the button I want to press to start the tests.
And here is the inspector info on the button.
As I said, I can activate this fine when full keyboard access is enabled because it's just a case of copying keyboard strokes.
I'm not sure if i'm misunderstanding the concept of identifying the buttons within the program or how to specify which window it's in (I assume it's window 1.)
This is an example of the type of script I've been writing to attempt to achieve this (I know this one just minimises the window.) Do I keep increasing the value of the button until it eventually just runs check computer? When I tried button 4 it activated an option under File on the top bar.
Any help would be greatly appreciated.
tell application "System Events" tell process "TechTool Pro 9" click button 2 of window 1 end tell end tell
Run Check Computerbutton inside of a
group. So, you'd have to use something like e.g.:
click button 2 of group 1 of window 1
Watch Me Do, which records your mouse clicks and returns some AppleScript code containing the object referencing. It's a similar technique to mine, but slightly differently implemented. You could try using that to see if it can pick up the object reference.