ph34r Posted July 13, 2008 Share Posted July 13, 2008 (edited) $coord = PixelSearch( $minix1, $miniy1, $minix2, $miniy2, 0x13F5B5, 10) While $coord = PixelSearch( $minix1, $miniy1, $minix2, $miniy2, 0x13F5B5, 10) Sleep(100) WEnd If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf [img]http://img120.imageshack.us/img120/422/asdasdasdge7.png[/img] Im trying to detect when the button to the left turns into the button to the right meaning the game joined a lobby and it has to click Ready, the button Prev (previous) turns into ready with green text So here are my cordinates of the box im trying to make [code] Top Left 268, 116 Bottom Right 300, 128 I cannot use checksum because sometimes when u join games, the buttons flash, i have to detect when the button text goes green. Thank you in advance Edited July 13, 2008 by ph34r Link to comment Share on other sites More sharing options...
ph34r Posted July 13, 2008 Author Share Posted July 13, 2008 Bump comeon pplz! Link to comment Share on other sites More sharing options...
Pain Posted July 13, 2008 Share Posted July 13, 2008 wouldn't PixelChecksum be better to see if something has changed, in this case the button. the example in the helpfile should work for you. Link to comment Share on other sites More sharing options...
ph34r Posted July 13, 2008 Author Share Posted July 13, 2008 (edited) KK ty but one more question PixelChecksum ( left, top, right, bottom [, step [,hwnd]] ) When it says Left Top right Bottom What does that mean is x left y right? or what. Also if these were the cords 268, 116 TOP LEFT ^ Bottom right 300, 128 Color looking for BGR: 0x13F5B5 can you show me how to use checkpixelsum with this This is what i put WinWait("WarRock","") If Not WinActive("WarRock","") Then WinActivate("WarRock","") WinWaitActive("WarRock","") While = 1 $checksum PixelChecksum(268,116, 300, 128) Sleep(100) WEnd While $checksum = 0 MouseMove(521,108) MouseDown("left") MouseUp("left") Wend God this is so confusing.. someone please help Edited July 13, 2008 by ph34r Link to comment Share on other sites More sharing options...
Pain Posted July 14, 2008 Share Posted July 14, 2008 (edited) have you read the helpfile?you have the coordinates in wrong order...PixelChecksum ( left, top, right, bottom [, step] )RemarksA checksum only allows you to see if "something" has changed in a region - it does not tell you exactly what has changed.WinWait("WarRock","") If Not WinActive("WarRock","") Then WinActivate("WarRock","") WinWaitActive("WarRock","") $checksum = PixelChecksum(52, 40, 137, 88) ; from the picture above, use your own While $checksum = PixelChecksum(52, 40, 137, 88) ; from the picture above, use your own Sleep(100) WEnd MouseMove (x, y) ;change to your own coordinates MouseClick ( "left", x, y) ;change to your own coordinates Edited July 14, 2008 by Pain Link to comment Share on other sites More sharing options...
ph34r Posted July 14, 2008 Author Share Posted July 14, 2008 that doesnt make sense though.. When i find left and right it always gives me 2 cordinates like 392,328 So which one do i use? Link to comment Share on other sites More sharing options...
Aiakonai Posted July 14, 2008 Share Posted July 14, 2008 how are you finding left and right? hmm... I wonder which key is the any key :O Link to comment Share on other sites More sharing options...
ph34r Posted July 14, 2008 Author Share Posted July 14, 2008 i use au3info then i go to the top right of the box i wanna make and hit control alt f or w.e then bottom left.and for top i put the Y of the top right box and for right i but the x of it. Link to comment Share on other sites More sharing options...
ofLight Posted July 14, 2008 Share Posted July 14, 2008 Im trying to detect when the button to the left turns into the button to the right meaning the game joined a lobby and it has to click Ready, the button Prev (previous) turns into ready with green textCant you just search the area where the green text appears for the color green? that way u dont haveto mess with pixelchecksum, just use pixelsearch?? I guess I dont understand exactly wutt u want muttley There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
Aiakonai Posted July 14, 2008 Share Posted July 14, 2008 (edited) i use au3info then i go to the top right of the box i wanna make and hit control alt f or w.e then bottom left.and for top i put the Y of the top right box and for right i but the x of it. you might consider using screen coordinates which are represented as left, top under the mouse tab of the au3info window info program I dont know where you were getting something that mentioned left and right but if you did this. freeze it at top right record left1,top1 on mouse tab (in the au3info program) freeze it at bottom left record left2,top2 on mouse tab PixelChecksum ( left, top, right, bottom [, step] ) PixelChecksum( left2, top1, left1, top2 ) ________ . < left 1 top 1 | area in ?| .------------ ^ left 2 top 2 the coordinates on the mouse tab are based on the total screen If im not mistaken. so this would actually not work if you were to change resolution or resize the window. Edited July 14, 2008 by Aiakonai hmm... I wonder which key is the any key :O Link to comment Share on other sites More sharing options...
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