I have reviewed multiple scripts that address primarily changes on a retina display. I have a standard monitor (iMac 27"). The line of code that seems to give me trouble is:
tell application "System Events" to tell process "System Preferences" to tell window "iMac"
I have substituted the name of the window containing the parameters of my monitor (see picture).