Scripting with the window size

does it works only in vision ? or perspective too ? because i m getting exact my system display resolution from vision but not in perspective as it is returning some different ..
system display resolution is : 1366 * 768
Vision o/p: 1366 * 768
Perspective o/p: 1024*768

Please help to get same in perspective too