Hey everyone, i am stuck.
I'm trying to make my script see a color differance and then do something when that happends, but it wouldn't work, tryed to search a lot of thing.
Am trying the let my script see the diverance in the two grey colors in discord but wont work and says white and sometimes a different color.
Can someone please help me with this.
Thank you
pixel color
Re: pixel color
Feel free to post your script for feedback about it.
Re: pixel color
i geuss i have this to lead of but this is from an other post i tried to use but didn't work on discord (not tried in any otehr app)
Last edited by gregster on 09 May 2021, 13:06, edited 1 time in total.
Reason: Removed duplicates.
Reason: Removed duplicates.
Re: pixel color
"Didn't work" does not provide a lot of detail for the reader to figure out how to be helpful. What actually happens when you run this script? Exactly what should happen instead?
Re: pixel color
The first line of the script is missing a comma between the two numbers. That would only affect what gets shown in the GUI, though, not the part under the hotkey. But that is probably what’s wrong with the part where you say it says the wrong color since that is the only part you showed us that displays a color.
What are your coordinates based on? Are they based on Discord’s window coordinates or the overall screen coordinates? If they are based on the window, then that window needs to be the active window when the PixelGetColor is executed. If they are based on screen coordinates, then you need to specify CoordMode, Pixel, Screen (see the documentation on CoordMode).
In future posts, please post the text of your script in between [code][/code] tags, not as a screenshot of your editor.
What are your coordinates based on? Are they based on Discord’s window coordinates or the overall screen coordinates? If they are based on the window, then that window needs to be the active window when the PixelGetColor is executed. If they are based on screen coordinates, then you need to specify CoordMode, Pixel, Screen (see the documentation on CoordMode).
In future posts, please post the text of your script in between [code][/code] tags, not as a screenshot of your editor.
Re: pixel color
@boiler
my coords are based on my pc pixels, discord is on the second screen so i geuss thats teh problem
@mikeyww
when i run it, it says it a white color but i am using dark mode on discord and i color picked it aswell so i know the color code.
does any of you have a script i can use for that?
my coords are based on my pc pixels, discord is on the second screen so i geuss thats teh problem
@mikeyww
when i run it, it says it a white color but i am using dark mode on discord and i color picked it aswell so i know the color code.
does any of you have a script i can use for that?
Re: pixel color
@boiler
how do i do that?
how do i do that?
Re: pixel color
At the top of the script, you write CoordMode, Pixel, Screen. That is how it is done.
As @boiler also noted: "In future posts, please post the text of your script". Include a description of what happened, and a description of what should happen instead.
As @boiler also noted: "In future posts, please post the text of your script". Include a description of what happened, and a description of what should happen instead.
Re: pixel color
@mikeyww
but do i just have to write discord as screen?
and the pixel where to check right?
but do i just have to write discord as screen?
and the pixel where to check right?
Re: pixel color
No. You literally put the following line at the top of your script. Do not change one letter.
Code: Select all
CoordMode, Pixel, Screen
Re: pixel color
Code: Select all
CoordMode, Pixel, Screen
PixelGetColor, Color, 2681 513, RGB
Gui, Add, Text, vColor w200, The Color: %Color%.
Gui, Show, w185 h100, Color.
f1::
SoundBeep
loop
{
PixelGetColor, Color, 2745, 629, RGB
if (Color == 0x36393F)
{
msgbox, Bang
break
}
else
{
msgbox, try again
sleep 1000
break
continue
}
}
return
I tried this but it still says white am i doing something wrong?
Re: pixel color
You still haven't put the comma in between the 2681 and the 513 in the first PixelGetColor command at the top of the script.
Where would it say "white"? I see nothing in your script that shows that it would display the word "white".
Are you sure the coordinates are correct? Did you use the Window Spy tool to get them? If so, were they the numbers after the word "Screen", "Window", or "Client"?
When you post the text of your script, please put [code][/code] tags around it so it goes in a code box.
Where would it say "white"? I see nothing in your script that shows that it would display the word "white".
Are you sure the coordinates are correct? Did you use the Window Spy tool to get them? If so, were they the numbers after the word "Screen", "Window", or "Client"?
When you post the text of your script, please put [code][/code] tags around it so it goes in a code box.
Re: pixel color
@boiler
well i did a thing and now it wrks i think XD, btw ty for saying the comma now i can see teh color code
Also do you know how to like check it every ms or few ms? Like a auto loop that checks until it finds it.
well i did a thing and now it wrks i think XD, btw ty for saying the comma now i can see teh color code
Also do you know how to like check it every ms or few ms? Like a auto loop that checks until it finds it.
Re: pixel color
Here is my script i have rn:
Code: Select all
CoordMode, Pixel, Screen
PixelGetColor, Color, 2942, 850, Slow
Gui, Add, Text, vColor w200, The Color: %Color%.
Gui, Show, w185 h100, Color.
f1::
SoundBeep
loop
{
PixelGetColor, Color, 2942, 850, Slow
if (Color == 0x36312F)
{
msgbox, Bang
break
}
else
{
msgbox, try again
sleep 1000
break
continue
}
}
return
Who is online
Users browsing this forum: No registered users and 58 guests