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?
You can do this with AppleScript. First create "EnableAirplay.scpt" and paste following content in it:
Then you can run this script with following command:
This will automate enabling AirPlay. For more detail you can refer to following references: