I’m new to both the forums and Applescript. I tried both Googling and searching the forums here for an answer, but alas no luck. I’m aware of the beginner booklets, but I’m not really interested in learning Applescript just now, even if it does seem like a lot of fun. I just need a script that runs like this.
if display profile “x” then
set display profile “y” else
set display profile “x”
This is meant to operate like this: If I have display profile X activated, then I want the script to change it to Y by clicking on it. If however Y is activated, I want it to change to X by clicking on it. The problem is, I have no idea how to translate this into applescriptish. I gave it a few attempts with modifying existing scripts I found on the web, but it just gave me an error.
Maybe this will already help you? Also please take care of the hints given here.
-- enter your two profile names here
property profilenameone : "xxx"
property profilenametwo : "yyy"
tell application "ColorSyncScripting"
set curprofilename to name of display profile of display 1
if curprofilename is equal to profilenameone then
set display profile of display 1 to profile profilenametwo
else if curprofilename is equal to profilenametwo then
set display profile of display 1 to profile profilenameone
end if
end tell
Thank you very much! Works perfectly. I did read that thread, from it I wasn’t able to figure out this piece of code, however. When I look at your code, I realize that what I lacked in my attempt was the “curprofilename” and the “is equal to”. Once again, thank you.