1

I have done a script to quit program:

tell application "Live"
    quit
end tell

…but I get this prompt to click the OK button:

Ableton Live

I am running my Mac for schedule shutdown as it is running for an exhibition with unman on/off.

Could someone help me write an AppleScript to click this button?

0

1 Answer 1

1

You might simulate pressing command-Q and return instead:

delay 0.5 -- time to release modifier keys if for example the script is run with command-R
tell application "System Events"
    set frontmost of process "Live" to true
    keystroke "q" using command down
    keystroke return
end tell

Or use ignoring application responses so the quit command doesn't block the script:

delay 0.5
ignoring application responses
    quit application "Live"
end ignoring
delay 1
tell application "System Events" to keystroke return

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .