Alex Rivera | Logout

How can I change the main display via AppleScript?

Asked 2008-09-16T01:10:40.443
10

From the Displays pane in System Preferences, I can manually change the main monitor by dragging the menu bar from one display to the other. I'd like to automate this and make it part of an AppleScript.

Edit
Report

1 Answer

1

You should see if you can do it via AppleScript's User Interface Scripting. It allows you to manipulate an application's GUI elements; useful when the app doesn't support scripting directly. I'd test it myself but I don't have any extra displays lying around.

Here's a pretty good overview by MacTech.

answered 2009-12-12T23:06:35.963

Your Answer