Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,010
163
Norway
Is there an app that allows me to toggle using an external display (TV) with a Macbook Pro/using only the built-in display, or would I have to create an Automator script for that?
 

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,010
163
Norway
Thanks.
I did try DisableMonitor (the older G1.92 version, as the latest version doesn't work on my MacOS 10.13.6 High Sierra) but it's not quite what I'm after. Lunar appears to be overkill and I don't see an audio input selection available.

The problem I'm trying to overcome is this: I have a Macbook Pro connected to a TV for viewing videos on. But if I use the Mac without the TV turned on I sometimes open up apps which display on the TV anyway (meaning I can't see it).
The quick & dirty solution is to unplug the MiniDP to HDMI cable, but in the long run that'll cause a lot of tear & wear, so I've found out that turning display mirroring on will solve it in software, but this means a lot of clicking and selecting.

So I've been thinking that the Applescript you helped me with to toggle between Wifi-sharing on/off could perhaps be modified to do what I want. I've already started looking at it and I think it can be done without too much hassle. That way I can have it saved as an Application and put in the dock, and whenever I need to switch modes I just click once on it.
Here's an overview of I want done in the two toggle modes, by going into the various system preferences:

Mode A (two separate displays: Macbook Pro + external TV)
  1. System preferences-Displays-TV: resolution: default for display
  2. System preferences-Displays-Built in display: resolution: default for display
  3. System preferences-Displays-Built in display-Arrangement: mirror displays: OFF
  4. System preferences-Sound-Output: TV (HDMI)
Mode B (only Macbook Pro display)
  1. System preferences-Displays-TV: resolution: default for display
  2. System preferences-Displays-Built in display: resolution: default for display
  3. System preferences-Displays-Built in display: optimize for: built in display
  4. System preferences-Displays-Built in display-Arrangement: mirror displays: ON
  5. System preferences-Sound-Output: internal speakers
So it should just be a matter of automating the opening and clicking of those system pref panes, right?
With the help of this simple Applescript for finding system preference IDs I've found out that I'm concerned about the following two:

Displays (com.apple.preference.displays)
Sound (com.apple.preference.sound)

So from the wifi-sharing script I understand that the procedure involves selecting the proper ID, then the item number? Does anyone know of any good documentation on this?
 
Last edited:

bogdanw

macrumors 603
Mar 10, 2009
5,718
2,751
  • Like
Reactions: Slartibart

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,010
163
Norway
Oh, I see. I must have confused you with someone else.
That Wifi-sharing Applescript application in the dock works great! Instead of going through all those Network and Sharing system preference settings I can do it all in one click, which would be ideal for this scenario as well, but each to their own preference and use :)
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.