Jump to content
Sign in to follow this  
chir0n

Incorrect Pixel Color

Recommended Posts

chir0n

Need help. Somehow when I use a certain pixel color to change the background of my exe's window, it gives a different color

Example:

My preferred color is: 0xFFFAA5 (yellowish-white)

But something's wrong instead of that it gives me a rather dark shade of green.

I've tried using the info window tool in the SciTE (ctrl+f6) to accurately get the pixel hex code of the color but surely it gives me FFFAA5

What gives? Thanks in advance

Share this post


Link to post
Share on other sites
Melba23

chir0n,

Welcome to the AutoIt forum. :)

Can you please show us the code where you change the GUI colour? I agree that 0xFFFAA5 is light yellow, so I an unsure what is happening. :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
chir0n

$gui = GUICreate("Simple WIndow", 650, 400)
With $gui
.bgcolor = 0xFFFAA5
EndWith

Here. Thanks for the welcome :) Hoping to learn more of AutoIt

EDIT: Sorry, I was doing this with an object, but I just stupidly made-up some quick code just to show you how I was doing it, sorry!

Edited by chir0n

Share this post


Link to post
Share on other sites
Melba23

chir0n,

It works if you do it this way: :)

#include <GUIConstantsEx.au3>

$gui = GUICreate("Simple WIndow", 650, 400)
GUISetBkColor(0xFFFAA5)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Why the strange syntax in your snippet? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
chir0n

Thank you for the quick response sir M23!

Sorry for the strange code, but I was literally doing it with a flash object

Real code:

$gui = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")


With $gui
    .bgcolor = 0xFF0000
EndWith

Is this correct?

Another question, hex codes do not start of with a "0x" at the beginning right? So if I were to do a pixelsearch, and I want it to find a red pixel which is FF0000, then would it be 0xFF0000?

Sorry I'm still new to these kinds of things. Thanks anyway

Share this post


Link to post
Share on other sites
Melba23

chir0n,

I have no idea if that is correct, sorry. I have never tried to do that. :(

But I wonder if you might need to use an 8 digit AARRGGBB or even AABBGGRR hex in that case. Have you tried? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
bogQ

i think its "#FFFAA5" instead 0xFFFAA5

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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  

×