Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to enable/disable airplay mirroring with an script and I don't know how to find what commands are executed when Airplay is activated.

Any idea about how to do it or where to search?

Thank you!

share|improve this question

2 Answers 2

You can do this with AppleScript. First create "EnableAirplay.scpt" and paste following content in it:

tell application "System Preferences"
    set current pane to pane "com.apple.preference.displays"
    activate
end tell

tell application "System Events"
    tell process "System Preferences"
        click pop up button 1 of window 1
        click menu item 2 of menu 1 of pop up button 1 of window 1
    end tell
end tell

tell application "System Preferences"
    quit
end tell

Then you can run this script with following command:

osascript EnableAirPlay.scpt

This will automate enabling AirPlay. For more detail you can refer to following references:

share|improve this answer

Check this page: http://oguzarduc.blogspot.com/2012/08/applescript-for-activating-airplay.html

share|improve this answer
2  
Welcome to Super User! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Oliver Salzburg Aug 13 '12 at 18:54

Your Answer

 
discard

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.