My scenario
I have a macbook pro which connects to either a 19" monitor which runs at 1280x1024 75hz or a 37inch TV which runs at 1920x1080 60hz. I used to just switch the cable that was connected to the macbook pro and click the 'detect displays' each time to configure the resolution.

The issue
I bought a simple VGA switch which just switches the i/o between the different monitors with a flick of a switch. It works but everytime I switch the 'detect displays' button on my mac no longer works and each time I switch I have to manualy select the correct resolution.

Is there any way that I can fix this problem and make a simple command key, shortcut button to automatically change the resolution when I flick the switch? I tried the 'record' function in automator but it kept having issues when playing it back, it did the wrong thing & failed.