Sign in to follow this  
Followers 0
Chimaera

Desktop Resolution

2 posts in this topic

#1 ·  Posted (edited)

Hey all

I was tinkering with a script and i came up with this

Someone may find it of use, but there may be lots of better ways to do it.

Feel free to alter it.

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.6.1
 Author:         Chimaera

 Script Function: Desktop Resolution
#ce ----------------------------------------------------------------------------

;Resolution
If @DesktopWidth = 640 And @DesktopHeight = 480 Then
    $resolution = "640 x 480 (4:3) VGA"
ElseIf @DesktopWidth = 800 And @DesktopHeight = 600 Then
    $resolution = "800 x 600 (4:3)(12:9) SVGA"
ElseIf @DesktopWidth = 1024 And @DesktopHeight = 768 Then
    $resolution = "1024 x 768 (4:3) XGA"
ElseIf @DesktopWidth = 1152 And @DesktopHeight = 864 Then
    $resolution = "1152 x 864 (4:3) XGA+"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 720 Then
    $resolution = "1280 x 720 (16:9) HD Ready"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 768 Then
    $resolution = "1280 x 768 (5:3)(15:9) WXGA"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 800 Then
    $resolution = "1280 x 800 (8:5)(16:10) WXGA"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 960 Then
    $resolution = "1280 x 960 (4:3) SXGA"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 1024 Then
    $resolution = "1280 x 1024 (5:4) SXGA"
ElseIf @DesktopWidth = 1366 And @DesktopHeight = 768 Then
    $resolution = "1366 x 768 (16:9) Basic HD"
ElseIf @DesktopWidth = 1440 And @DesktopHeight = 900 Then
    $resolution = "1440 x 900 (8:5)(16:10) WSXGA"
ElseIf @DesktopWidth = 1600 And @DesktopHeight = 900 Then
    $resolution = "1600 x 900 (16:9) HD +"
ElseIf @DesktopWidth = 1600 And @DesktopHeight = 1200 Then
    $resolution = "1600 x 1200 (4:3) UXGA"
ElseIf @DesktopWidth = 1680 And @DesktopHeight = 1050 Then
    $resolution = "1680 x 1050 (8:5)(16:10) WSXGA +"
ElseIf @DesktopWidth = 1920 And @DesktopHeight = 1080 Then
    $resolution = "1920 x 1080 (16:9) Full HD"
ElseIf @DesktopWidth = 1920 And @DesktopHeight = 1200 Then
    $resolution = "1920 x 1200 (8:5)(16:10) WUXGA"
Else
    MsgBox(16, "Error", "Unsupported Resolution")
Exit
EndIf

MsgBox(0,"Desktop Resolution", $resolution & " @ " & @DesktopRefresh & " Hertz")

Hope its usefull

Chimaera

Edited by Chimaera

Share this post


Link to post
Share on other sites



Hey all

I was tinkering with a script and i came up with this

Someone may find it of use, but there may be lots of better ways to do it.

Feel free to alter it.

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.6.1
Author:         Chimaera

Script Function: Desktop Resolution
#ce ----------------------------------------------------------------------------

;Resolution
If @DesktopWidth = 640 And @DesktopHeight = 480 Then
    $resolution = "640 x 480 (4:3) VGA"
ElseIf @DesktopWidth = 800 And @DesktopHeight = 600 Then
    $resolution = "800 x 600 (4:3)(12:9) SVGA"
ElseIf @DesktopWidth = 1024 And @DesktopHeight = 768 Then
    $resolution = "1024 x 768 (4:3) XGA"
ElseIf @DesktopWidth = 1152 And @DesktopHeight = 864 Then
    $resolution = "1152 x 864 (4:3) XGA+"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 720 Then
    $resolution = "1280 x 720 (16:9) HD Ready"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 768 Then
    $resolution = "1280 x 768 (5:3)(15:9) WXGA"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 800 Then
    $resolution = "1280 x 800 (8:5)(16:10) WXGA"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 960 Then
    $resolution = "1280 x 960 (4:3) SXGA"
ElseIf @DesktopWidth = 1280 And @DesktopHeight = 1024 Then
    $resolution = "1280 x 1024 (5:4) SXGA"
ElseIf @DesktopWidth = 1366 And @DesktopHeight = 768 Then
    $resolution = "1366 x 768 (16:9) Basic HD"
ElseIf @DesktopWidth = 1440 And @DesktopHeight = 900 Then
    $resolution = "1440 x 900 (8:5)(16:10) WSXGA"
ElseIf @DesktopWidth = 1600 And @DesktopHeight = 900 Then
    $resolution = "1600 x 900 (16:9) HD +"
ElseIf @DesktopWidth = 1600 And @DesktopHeight = 1200 Then
    $resolution = "1600 x 1200 (4:3) UXGA"
ElseIf @DesktopWidth = 1680 And @DesktopHeight = 1050 Then
    $resolution = "1680 x 1050 (8:5)(16:10) WSXGA +"
ElseIf @DesktopWidth = 1920 And @DesktopHeight = 1080 Then
    $resolution = "1920 x 1080 (16:9) Full HD"
ElseIf @DesktopWidth = 1920 And @DesktopHeight = 1200 Then
    $resolution = "1920 x 1200 (8:5)(16:10) WUXGA"
Else
    MsgBox(16, "Error", "Unsupported Resolution")
Exit
EndIf

MsgBox(0,"Desktop Resolution", $resolution & " @ " & @DesktopRefresh & " Hertz")

Hope its usefull

Chimaera

This should be posted in Examples Scripts


[center]First Ever Script/App[/center][center]Simple Battery Meter[/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0