Sign in to follow this  
Followers 0
Ultratech

Pixel Search

15 posts in this topic

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?

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

No just the troubling part. The other is just assigning a hotkey. It's a short script.

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

I just took a look at sandman's post, that looks like it might work. Any tips still welcome.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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'

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Try this.

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

EDIT: dam to slow xD

Edited by phantom

Share this post


Link to post
Share on other sites

You guys do realize that pixelgetcolor returns a dec, and you're checking for hex?

Did you look at my edit :S

Share this post


Link to post
Share on other sites

Nothing's working :whistle: I tried it all and it doens't work.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

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'

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  
Followers 0