DNnlee Posted April 14, 2008 Posted April 14, 2008 WinWaitActive("GAMES") WinMove ( "GAMES", "", 0, 0 , 210, 330, 20) ControlMove("GAMeS", "", "[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]", 0, 0, 160, 120) AutoItSetOption ( "Pixelcoordmode" , 2 ) ;1=absolute, 0=relative, 2=client $lifecheck = PixelSearch( 46, 3, 48, 8, 0xFFFFFF, 1) While not @error sleep(1000) $lifecheck = PixelSearch( 46, 3, 48, 8, 0xFFFFFF, 1) ;;; redefine them according to client mode WEnd msgbox (4096, "pixelsearch", "full healed" ) so i make it search for WHITE at where my life bar is... i'm fully healed when there is no more white.... but for some reason it always think im fully healed...aka no white no matter what. when i use the autoit function... this is supposed to make my pixelsearch function click only in the Client window right?
junkew Posted April 14, 2008 Posted April 14, 2008 I would suggest to try with PixelGetColor ( x , y ) what you get back as color for the points you want to investigate. for $x=46 to 48 for $y=3 to 8 consolewrite(hex(pixelgetcolor($x,$y)) & ";") next consolewrite(@CRLF) next FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
LogicalAI Posted April 14, 2008 Posted April 14, 2008 I just posted something here that might help you:http://www.autoitscript.com/forum/index.php?showtopic=68804While 1 For $Line = 1 To 300 ;length of the scan line in pixels If PixelGetColor($InitialPosition + $Line, 345) < 14777215 Then ;you've hit the color range you are after ExitLoop ExitLoop EndIf Next Sleep(10) WEnd
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now