Shortcut on Mac to connect an AirPlay screen?

My use of Shortcuts has been close to zero, as I fail to automate the simplest of tasks, so asking the experts on here:

How would I go about setting up a shortcut that does the following steps:

  1. Access “System Settings”
  2. Select the “Displays” option
  3. From the “Add display” drop-down, choose “Office” (name of my Apple TV)
  4. Set as “Extended display”

That’s it.

Looking at the available options to choose from in “System Settings”, I can’t find a way to do this. Hoping I am overlooking something. This is the type of repetitive task that should be shortcutable, right?

Thanks!

I ended up writhing apple script which uses clickclick command to select control center, airplay, name of Apple TV. If anyone has a better solution, please share

1 Like

Hi.

As a non-programmer how can I get my hands on a script like that?

I created a shortcut that basically turns on a HomeKit light scene, wakes my Mac and then turns on my Apple TV, which starts my projector.

My goal is to have my Mac start mirroring to the Apple TV as a last step. Help!?