Startup script to detect resolution

Would there be any way through scripting or otherwise to detect any device settings (such as resolution) and use that to dynamically choose the startup/home page? I’m trying to see if there is a way to have a single hrp file that could be used on both tablets and phones with different layouts to optimize for the small vs large screen.

There is not a way to detect screen resolution.