Is there a way to make it with the current tools?
If not, It'd be nice to have this feature for mac mini / studio so an iPad can be used as screens without the need of another screen to enable it.
I think I am searching for the same task?
This is the only thing I found but I haven't tested it yet
Thank you for posting the link. I think the developer nailed it "Subject to break on macOS updates due to use of private APIs."
I am really sorry about those people doing great work for us, then an update breaks their work. Must be frustrating.
yeah that's just part of being an automation app that wants to be as powerful as possible. BTT also regularly needs to rely on private API that might break in the future. Luckily so far this has only happened a few times, but Apple is constantly making it harder to use such API at all.
The github project looks interesting, I could add an action to BTT that executes this code.
Didn't you shared the information, that you also are using your iPad as a 2nd monitor sometimes? You never missed this options on your own then?
So far the only supposedly reliable option I've found for this matter is 3rd party hardware, but Sidecar is just right there.
As said above I haven't tested the repo myself, but if it can be integrated and automated in BTT It'd be way more accessible. Possibly using BTT Remote from the iPad even.
I also found this AppleScript here in the Forum (Link) from @Max_Megalon, but this code worked just once here (and opened AppleMusic instead), I restarted BTT but it never run again.
for a german system use : "Kontrollzentrum"
tell application "System Events"
tell its application process "Kontrollzentrum"
tell its menu bar 1
-- click on and open Control Center drop down
tell (UI elements whose description is "Kontrollzentrum")
click
end tell
end tell
-- interact with Control Center window
tell its window "Kontrollzentrum"
delay 0.5
-- click screen mirroring button
set screenMirroringButton to button 2 of group 1
-- click screenMirroringButton click doesn't work
perform action 1 of screenMirroringButton
delay 0.5
set myScreen to checkbox 1 of its scroll area 1 of group 1
perform action 1 of myScreen
end tell
end tell
end tell
Hi there,
I just checked, the script is still working over here. I am on a German MacOS 14.7.4 (23H420). It depends on the buttons awailable in the control center. The script first 'clicks' here:
and then the position where the iPad is displayed in this dialog (first on mine).
Hi Max, thanks for participating!
In a new action trigger AppleScript that script works once (for AppleMusic) and then never again. /the Moment I wished I had studied coding
I tried out via SystemPreferences -> Kontrollzentrum, but this is more for visibility. How do I count buttons and groups? #mysterious
I have really no idea, but here a little bit of guesswork...
my control center shows the Stage manager (button 1) and Screen Mirror (button 2)
set screenMirroringButton to button 2 of group 1
your control center shows only one button (Screen Mirror)
you could try:
set screenMirroringButton to button 1 of group 1
Note: there is a small difference in your script, in mine it is (ControlCenter) only here,
tell its application process "ControlCenter"
in the rest of the script is the German word (Kontrollzentrum)
Button 1 of Group 1 did the trick to open the next window. Great! Also, the script runs now every time I press on it (before, I had to delete the whole action trigger).
I tried to play around with the numbers like you did, but I am stuck here. How jump onto the iPad dialog?
In 5.240 (uploading) I have added native "Connect iPad SideCar" and "Disconnect iPad SideCar" actions
works ! Great. thanks a lot...
It works great! I'll try to automate it on startup if an external screen is not detected = headless mode
Is there any external screen related condition? I'll look into apple script otherwise.
Probably a USB connection would work best in case wifi is not an option.
works great, thank you a lot!
@CarlosUnch you may want to sign Andreas post as "Solution", so others can find it more easier?
@Andreas: This is a prominent feature I would say and would highlight it anyhow anywhere.
Me for myself do copy and past the link to this thread to the older ones for those later BTT users using this Forums search engine.
Best! Johannes
Answering myself, I've built this action which triggers sidecar on BBT startup when the connected_screen is not my screen (ideally would be without any screen)
exported_triggers.bttpreset (3.3 KB)
My iPad wakes and stays on locked screen but sidecar doesn't appear. Same with a USB connection. Connecting a screen later I saw these.
Triggering sidecar connection via BBT by hand after connecting the screen works fine, it seems not to work when there's no screen.. which kinda defeats the headless operation.
Another test, sidecar active, unplugging the screen makes sidecar disappear.
This seems something new as I was able to have sidecar without additional screen on previous versions of the system (3 years go)
All in all seems like Apple purposely killed Sidecar headless mode. I'll research a bit more but it seems like a dead end.
Anyway, the action works flawlessly, thank you @Andreas_Hegenberg for the quick feedback as always!
that’s annoying ;-(
I‘ll check whether there is any way to enable headless mode
if you are willing to buy BetterDisplay (awesome app), I got it to work by creating a virtual display
//edit: might also work with the free version https://www.youtube.com/watch?v=R4ZnPoKJZ-M
It does work with the free version!
Sooo nice, I had no idea of the option to have a virtual screen.
The only downside (minor) is that the virtual screen appears as main screen, and system settings opens on it. Now I'll see if there's a "move active window to screen with mouse" around BTT.
Thanks once more!