Page 1 of 1

Turn On/Off Mirroring

Posted: Mon Mar 19, 2007 7:46 pm
by pgt
Can someone tell me how to make LaunchBar toggle Mirroring of Displays on and off? It seems like an obvious use of LB, perhaps via an Applescript, but I haven't been able to make it work.

Turn On/Off Mirroring

Posted: Wed Aug 08, 2007 5:26 pm
by pgt
Eight months after posting my question above, I'm back hoping to find a solution, and still not a peep...

If LB could be made to toggle mirroring on and off, I would use that constantly. For me, it is the most important thing for LB to do that it currently doesn't do for me.

Is this really so hard? Seems like I must be missing something and everyone else already has it working. Right?

Please clue me in on how to do it even if you think the question is too easy!

Posted: Thu Aug 09, 2007 12:03 am
by ludwigschubert
While I understand that you think it should be easy to do, I guess it's not really suitable for a LaunchBar feature - things like these should be taken care of via an applescript, just like you said.

I'd suggest posting on Apple's own support forums; asking for help on how to turn on/off mirroring via an applescript.

Apple's forums got a larger and more active user base and can be found here:


Posted: Thu Aug 09, 2007 1:17 am
by BravoAlpha
There's also MacScripter.

Posted: Mon Aug 20, 2007 10:36 am
by Guest
tried pressing f7?

Posted: Mon Oct 22, 2007 6:35 am
by pgt
Just to keep this alive...

Toggling mirroring continues to be the #1 thing I'd like to do with LB, but haven't been able to figure out. Next month, it will be the first thing I try to do with the new LB-like functionality in Leopard's Spotlight.

BTW, WRT the previous reply, F7 is useful when --for example-- connecting one's laptop to a projector for a presentation, when you're still relying on the laptop's keyboard.

My concern here --and no doubt the situation for many others-- is that I'm plugging the laptop into an external monitor AND keyboard (and mouse) for heavy use at my desk. In my case, there's also a KVM switch in between because I have several computers connected to the same desktop KVM stuff. In that configuration, the F7 key doesn't work. Even if it did, LB would still be a faster and more efficient way to do toggle mirroring.[/list]

This is soooo frustrating ;-)

Posted: Mon Oct 22, 2007 7:17 pm
by ludwigschubert
Arrgh…! I've been Applescripting, and I came up with two different ways to try to do this (great help: = PreFab UI Browser

I'll post the code here, maybe someone finds the/a mistake. I can't get it to work, although the actual command comes straight from PreFab UI Browser… :?
You should adjust the name of the window and the checkbox, as I run a German localisation of Mac OS X:

Code: Select all

(*First implementation. doesn't compile :-( *)
tell application "System Preferences"
click checkbox "Bildschirme synchronisieren"  of group 1 of tab group 1 of window "Farb-LCD"
end tell

(*Second implementation. doesn't compile :-( *)
tell application "System Preferences"
perform action "AXPress" of checkbox "Bildschirme synchronisieren"  of group 1 of tab group 1 of window "Farb-LCD"
end tell

In theory it should work, (it does in PreFab UI Element Inspector)
maybe someone can help.
UI-Scripting is terrible! :wink:


PS: Yes, I also tried to modify the .plist directly, didn't work for me either… :(

PPS: I can't simply emulate the F7 keypress, as Applescript doesn't know the modifier key "fn" :( :(