Jump to content

Find all available screen resolution based on hardware


fosil
 Share

Recommended Posts

I'm working on a script that needs to find out screen resolutions that windows finds available based on your current setup and react accordingly.

I'm wondering if there is a way to pull a list of all available screen resolutions (not just current) into autoit? Or if anyone knows the location where windows might store this that would be helpful as well.

Any help is much appreciated!

Link to comment
Share on other sites

This is one possible solution:

; List All Possible Video Controller Resolutions (Win 7)
Local $strComputer = "."
Local $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")
Local $colItems = $objWMIService.ExecQuery("Select * from CIM_VideoControllerResolution")
For $objItem in $colItems
    ConsoleWrite("Setting: " & $objItem.SettingID & @crlf )
Next
Exit

Output sample:

Setting: 640 x 480 x 256 colors @ 60 Hertz
Setting: 640 x 480 x 256 colors @ 59 Hertz
Setting: 640 x 480 x 256 colors @ 75 Hertz
...
Setting: 1680 x 1050 x 4294967296 colors @ 60 Hertz
Setting: 1920 x 1080 x 256 colors @ 60 Hertz
Setting: 1920 x 1080 x 65536 colors @ 60 Hertz
Setting: 1920 x 1080 x 4294967296 colors @ 60 Hertz

 

Link to comment
Share on other sites

  • 5 years later...

Thanks! Just what I needed for my script

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...