Check screen resolution

Hi,
I'm working on a 1920x1080 project (screen resolution obv).
But when I work on the same project at a lower screen resolution some windows opens in a wrong place (out of the screen for example).
Is there a way to check with a conditional branch for screen resolution?
I.e.
If s.r. = 1920x1080 --> winX = tot & winY = tot
Otherwise if s.r. = 1280x720 --> change X e Y
I solved this myself!^^
For ones who are interested this script call

var screenResX = window.screen.width * window.devicePixelRatio;
$gameVariables.setValue(x, screenResX);
var screenResY = window.screen.height * window.devicePixelRatio;
$gameVariables.setValue(y, screenResY);

will store in variables resolution values.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/check-screen-resolution.123082/