AppleScript without showing what program it opened and edited I wrote an AppleScript that goes into System Preferences and clicks on some of the buttons. I does that by literally opening System Preferences and clicking UI Elements. I'm wondering, is it possible to not show what programs AppleScript opened and what it clicked and only show the result, (in my case it changes screen resolution)? That would result in faster script execution.
Not directly. You would have to figure out what underlying preferences the UI is changing, and whether there was a way to edit them directly using AppleScript or terminal commands (such as defaults write -- see man defaults for details.)

Unfortunately there is no canonical list of preferences that can be edited in this way, although you can find some here. There is also a website dedicated to hidden preference tweaks for OS X and Mac applications: defaults-write.com.

However, for your particular case, I'm pretty sure there is no built-in way to change resolutions from the command line. There is a screenresolution command that somebody wrote a few years ago, but it doesn't seem to work well with retina resolutions.