Page 1 of 1

How to define current aspect ratio (scripting)

PostPosted: Wed Dec 31, 2008 10:00 am
by Lyberodoggy
Well, I now have a 16:9 monitor, so I thought this might be usefull... You might want to know the aspect ratio of your user.

So, you can use this script to define if it is 4:3, 16:9 or none of them:
Code: Select all
If GetDisplayResolutionX*3=GetDisplayResolutionY*4 Then
aspectratio = "4:3"
else if GetDisplayResolutionX*9=GetDisplayResolutionY*16 Then
aspectratio = "16:9"
else
aspectratio = "unknown"
end if
end if


I know this might seem a little useless, but you need to know that 4:3 resolutions don't work well with widescreen monitors. So you can use this along with ChangeDisplayResolution to warn the user about the resolution problems.

PostPosted: Wed Dec 31, 2008 1:19 pm
by MRM2811
Lybero,

Where do you get all your wonderful ideas from?

:)

PostPosted: Wed Dec 31, 2008 1:53 pm
by Lyberodoggy
Just seeing the help files gives me ideas every now and then... You know like: "What could that be used for? :idea: