set command to "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution"
set output to words of (do shell script command)
set {dspwidth, dspheight} to {item 2, item 4} of output
After looking at your reply I have a new question. How did you put the code part of your reply in separate little window? I am very new to forums, actually my original question was the very first time I had ever posted to a forum.