golfjrr Posted June 16, 2004 Posted June 16, 2004 (edited) How do you deal with users who have say 16 bit color, 32 bit color etc when searching for certain colors since you get different results if they have different color depths. Also is there an easy way to test what color depth mode they are in? Yes I am an autoit newbie... Edited June 16, 2004 by golfjrr
CyberSlug Posted July 13, 2004 Posted July 13, 2004 (edited) According to this topic, beta versions of AutoIt should contain an @DesktopDepth macro that returns the color depth (32, 16, etc).Download the latest AutoIt beta from here: http://www.autoitscript.com/autoit3/files/unstable/autoit/(The autoit-v3.0.102.exe installer is probably the easiest to use) Edited July 13, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
randd Posted July 13, 2004 Posted July 13, 2004 If you don't want to use the new beta you can use one of these quick and dirty scripts. For win2k ; RegKey to video card used as Video0 which should be main/default video card $VideoCardTotalKey = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DeviceMap\Video", "\Device\Video0") ; Set results to an array split by \ $VideoCardTotalKeyArray = StringSplit( $VideoCardTotalKey, '\' ) ; Total number of items in the array $VideoCardTotalKeyArrayNumber = $VideoCardTotalKeyArray[0] ; Only concerned with last two keys. Pick them up by using array total and array total minus one. $VidString = & $VideoCardTotalKeyArray[($VideoCardTotalKeyArrayNumber - 1)] _ "\" & $VideoCardTotalKeyArray[$VideoCardTotalKeyArrayNumber] ; $VideoBits should = color depth in decimal value $VideoBits = RegRead("HKEY_CURRENT_CONFIG\System\CurrentControlSet\Services\" & $VidString, "DefaultSettings.BitsPerPel") MsgBox(4096, "Bits", $VideoBits) For winxp ; RegKey to video card used as Video0 which should be main/default video card $VideoCardTotalKey = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DeviceMap\Video", "\Device\Video0") ; Set results to an array split by \ $VideoCardTotalKeyArray = StringSplit( $VideoCardTotalKey, '\' ) ; Total number of items in the array $VideoCardTotalKeyArrayNumber = $VideoCardTotalKeyArray[0] ; Only concerned with last two keys. Pick them up by using array total and array total minus one. $VidString = $VideoCardTotalKeyArray[($VideoCardTotalKeyArrayNumber - 1)] & "\" ; $VideoBits should = color depth in decimal value $VideoBits = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\" & $VidString & '\0000\', "DefaultSettings.BitsPerPel") MsgBox(4096, "Bits", $VideoBits) There was a topic posted about this before. Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.
golfjrr Posted July 13, 2004 Author Posted July 13, 2004 According to this topic, beta versions of AutoIt should contain an @DesktopDepth macro that returns the color depth (32, 16, etc).Download the latest AutoIt beta from here: http://www.autoitscript.com/autoit3/files/unstable/autoit/(The autoit-v3.0.102.exe installer is probably the easiest to use)Thank you. I will look into it. I actually made that suggestion to add Desktopdepth. Someone actually took it, or maybe others suggested it as well..
golfjrr Posted July 13, 2004 Author Posted July 13, 2004 There was a topic posted about this before.I would have suspected but couldn't find it, so I asked the question and made the suggestion to add a macro for it. Looks like someone listened to somebody or maybe enough people wanted the feature it's at least made it into the beta.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now