Is it possible to detect a user's screen resolution and use that in the script?

Is it possible to detect a user's screen resolution and use that in the script?

Hello,
Does anyone know if I can detect the screen resolution and then use that information in my script?
Rob