Opened 12 years ago
Closed 12 years ago
#2289 closed Feature Request (Rejected)
PixelGetColor - output options
Reported by: | Rhyono | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | Severity: | None | |
Keywords: | Cc: |
Description
The current decimal output has to be converted to Hex using said function to view the color in a meaningful way, or in order to compare it to a variable with a six digit hex value (i.e. a standard color format), you have to convert it to hex with 6 digits, then back to decimal.
Could there be a (optional) third option for output, such as:
0 - default. Output whatever that decimal number currently is.
1 - six digit hex value.
2 - decimal representation of six digit hex value
Side note: is there a place to report typos in the documentation? Find "snd" on here: http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateCombo.htm
Attachments (0)
Change History (7)
comment:1 Changed 12 years ago by guinness
comment:2 Changed 12 years ago by BrewManNH
I'm not understanding the problem with it returning just the decimal number.
Doesn't this do what you're looking for, where the second messagebox shows the 6 digit Hex number?
Local $var = PixelGetColor(10, 100) MsgBox(0, "The decimal color is", $var) MsgBox(0, "The hex color is", Hex($var, 6))
Or even simpler, just automatically convert it to hex as you call it.
Local $var = Hex(PixelGetColor(10, 100), 6) MsgBox(0, "The decimal color is", Dec($var)) MsgBox(0, "The hex color is", $var)
comment:3 Changed 12 years ago by Rhyono
It doesn't return the decimal number I'd expect. I.e. I have a variable set to 0x0A1B22, which is then converted to 662306. The number that function will spit out by default when encountering that color is not that number. So in order to use PixelGetColor, I had to wrap the output.
So the output of that function is never usable in a sensical manner, prior to using another function on it.
comment:4 Changed 12 years ago by BrewManNH
The function returns the color of the pixel at the location specified. Either the color you're having it look for is different than what you think it should be, or there's a shade variation.
The function PixelGetColor returns a decimal value, which can easily be converted with the Hex function. I don't see an overwhelming need to have the devs add functionality when it's easy to get it another way with a function that already exists. Plus the fact that the value it returns on my system is the correct color, converted to Hex or in Decimal, means that the function is working properly.
comment:5 Changed 12 years ago by Rhyono
I'm having trouble reproducing it in a controlled environment, but when values that should have been matching up in my bot weren't, I had it output the values and they were confirmed not matching up. Then, I'd have it output it as Hex($color,6) and it would be the correct value, even though that hex value did not match the decimal value it had shown prior.
After using Dec(Hex(PixelGetColor($x,$y),6)), the problem went away and hasn't reoccurred.
comment:6 Changed 12 years ago by Jpm
It seems such discussion have to take place in the Forum.
From the point of view of the track, unless there is really a bug which can be reproduced just open a new ticket as Bug.
For the feature request no need to change the reporting type just use Hex() when needed
comment:7 Changed 12 years ago by Jpm
- Resolution set to Rejected
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Fixed typo in GUICtrlCreateCombo.