You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to write an AppleScript to change the color profile ?

Here is my Mac information, big sur system and Dell u2720qm monitor. I often need to change the color profile on my secondary display, and it really bother me to take so many steps to do it. so I want to change quickly. so how would you write an AppleScript to open System Preferences, go to the Display preferences on the secondary display and change the color profile? and how to switch the color profile quickly between Display P3 and SMPTE RP 431-2-2007 DCI(P3). I know little about the computer, so would you please give me the detailed explanation or the specific procedures how to do it. I would be so grateful if you could take some time to help me. thank you!

Mac mini, macOS 11.5

Posted on Sep 13, 2021 9:41 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 17, 2021 4:25 AM

To any Service that you create in Automator, you can associate a keyboard shortcut.


Just go to System Preferences->Keyboard->Shortcuts, click on Services, locate the one you want, and add the shortcut.


Similar questions

12 replies

Sep 14, 2021 2:55 AM in response to snbbdx

This will get you more than half way:


1) In Automator, create a new "Quick Action" (aka "Service")

2) Add a single "Run Applescript" action, so that it looks like this:


3) Save the Quick Action with a descriptive name, like "Color Profile"

4) In System Preferences->Keyboard->Shortcuts->Services, add a convenient keyboard shortcut for this Service.


Now just by pressing one keyboard shortcut, you will be taken to the right place and can click on the desired profile


You could investigate further if you want to do this in a fully automatic way - making your Automator Service also "click" the correct profile; but I think this provides a **** good start.

Sep 15, 2021 6:01 AM in response to Luis Sequeira1

     Mr.Sequeira, I am soooo grateful for your detailed reply and instructions. Thank god there is an expert who replies me finally. Now here are two problem. First, it fails to run the service in a Chinese language system. When I press the shortcut, it popped up a small window that said there is a problem with executing “Run AppleScript” : “System Preferences” encountered an error : cannot access the “pane “Displays””. (The photo is as follow) So how to fix it. Secondly, I did follow all the instructions, it turns out that it just pops up the widow of color profile of system preference though. I still need to select and click to change the color profile manually, rather than it run in an fully automatic way, which means as long as I press the shortcut, then the color profile changes automatically and directly without other redundant steps (like the pop-up widow and click manually). I did a lot investigation and searched a lot in many platforms but still get no answers. And my job need me to be as more efficient as I can be. Therefore, I wonder if you could help me out with this problem. It would be highly appreciated  if you could offer the instructions cuz I am totally the laymen of programming. I am so sorry to bother you again. I look forward to your reply.


                                                                                                   

Yours

Sincerely



Sep 15, 2021 7:25 AM in response to snbbdx

Sorry, I don't understand Chinese.

My system is in English, and I have no experience with doing scripts like this in other languages.

I could try a little test in Portuguese (my native language), but only later, as this would involve restarting my mac and I have stuff running.


Maybe you have to replace "Displays" with the appropriate word in Chinese?


how to write an AppleScript to change the color profile ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.