Jump to content

Pixel Search


 Share

Recommended Posts

Ok I'm searching a single coordinate of the screen (366, 240). I'm trying to write a script that does a command when that pixel changes a certain color. The color I'm using is 0x042313 or dark green. Only thing I know how to do is do a command if the color changes.

Func checkcolor() ; Check 366, 240 until it turns green then command
    $color = PixelGetColor(366, 240)
    Sleep(100)
    Do
        Sleep(100)
        PixelGetColor(366, 240)
    Until $color = 0x042313
    Send("{ENTER}")
EndFunc

This is all I could think of... any easy way to do this?

Link to comment
Share on other sites

is this the whole script ?

while 1
     If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe")
wend
[size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]
Link to comment
Share on other sites

i rly dont know :):whistle: sorry man

while 1
     If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe")
wend
[size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]
Link to comment
Share on other sites

Ok I'm searching a single coordinate of the screen (366, 240). I'm trying to write a script that does a command when that pixel changes a certain color. The color I'm using is 0x042313 or dark green. Only thing I know how to do is do a command if the color changes.

Func checkcolor() ; Check 366, 240 until it turns green then command
    $color = PixelGetColor(366, 240)
    Sleep(100)
    Do
        Sleep(100)
        PixelGetColor(366, 240)
    Until $color = 0x042313
    Send("{ENTER}")
EndFuncoÝ÷ Ù8b²+R¢é]¶§Ú'³,ÊÚ¢Øb³ú®¢×¢çhmºZµì¨º»Ú®&í7éÊ%¢·n®)ඥ¢l¢+b²w¯z¸(x-¡ÈZ¯+ajÖ®¶­sdgVæ2õVÄ6V6²¤Fò¥6ÆVW¢b33c¶6öÆ÷"ÒVÄvWD6öÆ÷"3cbÂ#C¥VçFÂb33c¶6öÆ÷"ÒC#30£²WBFRFærFòWV7WFRgFW"FR6öÆ÷"2f÷VæBW&P¤VæDgVæ

Edit : the return of pixelcolor is in decimal, is'nt it ?? Try to put the decimal number for "0x042313"

Edited by newb_powa'
Link to comment
Share on other sites

Don't have 'FFFFFF' (white) in your bottom right corner.

Run this:

checkcolor()

Func checkcolor()
    Do
        Sleep(100)
    Until StringTrimLeft(Hex(PixelGetColor(@DesktopWidth - 50, @DesktopHeight - 50)), 2) = 'FFFFFF'
    MsgBox(0, '', 'color found')
EndFunc

Open notepad (white background) and move it to the bottom right corner.

Link to comment
Share on other sites

Just trying to scan a square or a pixel and add a command when it changes to a color. Seems harder than I thought.

If it's alway the same color, try pixelsearch, with this you can search in a define area and look for differents shade

Edit: Try that, i'm not sure if it's going to work but if it do that would be great

Func checkcolor()
    $x = 0
    Do
        $color = PixelSearch(300, 200, 400, 300, 0x042313, 10)
        If IsArray($color) then
            $x = 1
        EndIf
    Until $x = 1
    ;Thing to Do Here
EndFunc

This is probably not the best solution but you should try it

Edited by newb_powa'
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...