Sign in to follow this  
Followers 0
ecstatic

Bit-Color Registry Check

2 posts in this topic

#1 ·  Posted (edited)

Hey guys, semi-autoit related question.

Anyone know where the regestry path is for the bit color/color quality in your display settings.

I know it is roughly located in

Local Machine - > System - > CurrentControlSet

Edited by ecstatic

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hey guys, semi-autoit related question.

Anyone know where the regestry path is for the bit color/color quality in your display settings.

I know it is roughly located in

Local Machine - > System - > CurrentControlSet

Well you can do the long away around and do something like:
ConsoleWrite(_Reg_GetBitsPerPixel() & @CRLF)

Func _Reg_GetBitsPerPixel()
    Local $s_reg_key_start = "HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\VIDEO"
    Local $s_key = "", $s_reg_key_next = "", $s_key_next = "", $s_read = ""
    Local $i = 1, $j = 1
    While 1
        $s_key = RegEnumKey($s_reg_key_start, $i)
        If @error Then ExitLoop
        $j = 1
        While 1
            $s_reg_key_next = RegEnumKey($s_reg_key_start & "\" & $s_key, $j)
            If @error Then ExitLoop
            $s_read = RegRead($s_reg_key_start & "\" & $s_key & "\" & $s_reg_key_next, "DefaultSettings.BitsPerPel")
            If $s_read Then Return $s_read
            $j += 1
        WEnd
        $i += 1
    WEnd
    Return SetError(1, 0, "")
EndFunc

Or you could just use:

@DesktopDepth
Up to you I suppose :) .

Edit:

If you just want the path, and not the value... then you could put this one line below $s_read =

If $s_read Then ConsoleWrite("Path = " & $s_reg_key_start & "\" & $s_key & "\" & $s_reg_key_next & @CRLF)
Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/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