Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sorry for this generic and probably bad-written question. I've never programmed in applescript, but I'm quite familiar with other coding language.

I'm in the need of clicking on 2 sequential button inside the lobby of a software (when you click the first a popup appears and we should click 'ok'). However things are a little bit more complicated then this because:

1) the lobby of this program isn't in foreground: it's covered by other windows opened. (I don't have experience so I don't know if this represent a problem).

2) there should be a timer and the program should click this button at regular intervals.

Is this feasible with applescript?

share|improve this question
up vote 1 down vote accepted

Yeah, you can usually interact with windows even if they were on the background or displayed by a hidden application. Finding UI elements is the harder part.

tell application "System Events" to tell process "Finder" to tell window 1
    -- properties of UI elements
    -- {class, value} of UI elements of UI elements
    -- buttons of group 1
        click button 2
        delay 3
    end repeat
end tell

UI scripting doesn't work unless access for assistive devices is enabled in the accessibility preferences.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.