Sign in to follow this  
Followers 0
goldenix

bugged PixelGetColor & PixelSearch?

3 posts in this topic

I tried them both, & it gave me same result.

The thing is, that it finds the pixel (its in the fullscreen game 800*600 btw & im searching 1 pixel) & sometimes it doesnt. It finds most of the time(80%), the screen does not change(i made shure of that)

Any ideas why it doing this?

Sample Code

Opt("MouseCoordMode", 0)        ;1=absolute, 0=relative, 2=client
Opt("PixelCoordMode", 0)        ;1=absolute, 0=relative, 2=client

HotKeySet("1", "_pixel")
HotKeySet("{esc}", "_exit")

Func _pixel_()
    While 1
        $coord = PixelSearch( 176, 88, 176, 88, 0xFFFBFF, 30 )
        If @error Then ControlSend("RF Online", "", "", Send("{F5}")) ;slam pots
    sleep(2000) 
    WEnd
EndFunc

Func _pixel()
    While 1
        $var0 = PixelGetColor( 176, 88 )
        If Hex($var0, 6) <> 'FFFBFF' Then ControlSend("RF Online", "", "", Send("{F5}")) ;slam pots
    sleep(2000) 
    WEnd
EndFunc

Func _exit()
Exit
EndFunc


while 1
Sleep(100)  
WEnd

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites



I don't know why but I have a similar problem. It must be buggy.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I don't know why but I have a similar problem. It must be buggy.

30 is pretty high have you tried something lower? The higher you go the more buggy it gets.

$coord = PixelSearch( 176, 88, 176, 88, 0xFFFBFF, 10 )

Edited by JamesDover

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