Open Tristram1 opened 2 weeks ago
Interesting, I have not tried this and am wondering why screen sharing breaks the automation. Maybe you can try to edit the script to disable screen sharing when the notification is found:
See this URL for commands to enable/disable it: https://www.macscripter.net/t/automator-or-applescript-to-turn-on-off-screen-sharing/69991/4
This is probably not a fixable issue: The script does not work if the Mac is sharing its screen (through Screen Sharing or Screens 5).
I have been struggling to get a headless Mac mini to AirPlay for my entire family, and your script allows us to get past the pesky AIRPLAY dialog (as long as the Mac isn't screen sharing). Thank you for your solution!