Rather than get a list of resolutions, I approached it the other way and have the palette/list the resolutions I want, i.e. not all that available.
In addition, instead of trying to workout which screen is what, It is hard coded for my layout which is Hp then Internal then the Toshiba screen.
I use this macro far more often than I expected.
See; Set Screen resolution for 1/2/3 screens and some KM Tips/Ideas