testmeout Posted November 20, 2005 Author Share Posted November 20, 2005 Sweet thanks man, But what if a different button is in the same place at a different time how would you exclude that? Link to comment Share on other sites More sharing options...
Valuater Posted November 20, 2005 Share Posted November 20, 2005 (edited) you should be a pitcher.... you keep throwing curve balls at me... lol i dont know 8) see why i hate guessing now??? Edited November 20, 2005 by Valuater Link to comment Share on other sites More sharing options...
testmeout Posted November 20, 2005 Author Share Posted November 20, 2005 Sorry thanks for sticking with me and helping me. That is why i was trying to do it based on the ClassNameNN instead of position Link to comment Share on other sites More sharing options...
testmeout Posted November 20, 2005 Author Share Posted November 20, 2005 I guess I could do a checksum for the button and then based on that add one Link to comment Share on other sites More sharing options...
testmeout Posted November 20, 2005 Author Share Posted November 20, 2005 I am having two problems 1) When I add in the checksum needs to be a certain value it never adds to the counter 2) The counter does not count in intervals of 1 it seems to be some random interval with no pattern Here is my code #include <GUIConstants.au3> #include <Misc.au3> Dim $post = 0 Opt("GUICoordMode", 1) Opt("WinTitleMatchMode", 1) Opt("MouseCoordMode", 2) WinActivate("Casino") WinWaitActive("Casino") $repeat = PixelChecksum(263, 411, 263+6, 411+12) While 1 If _IsPressed(01) Then ;MsgBox(0,"test", " cool"); for testing $pos = MouseGetPos() ; position of 1 button If $pos[0] > 168 And $pos[0] < 241 And $pos[1] > 373 And $pos[1] < 399 Then $post = 1 ; position of 2 button If $pos[0] > 233 And $pos[0] < 339 And $pos[1] > 398 And $pos[1] < 424 And $repeat == 2938540933 Then $post = 1 ; position of 3 button If $pos[0] > 408 And $pos[0] < 466 And $pos[1] > 373 And $pos[1] < 399 Then $post = 1 If $post = 1 Then $currentvalue = IniRead ("counter.ini", "counter", "currentcount", "0" ) + 1 Iniwrite ( "counter.ini", "counter", "currentcount", $currentvalue ) $post = 0 EndIf EndIf Sleep(50) WEnd Any ideas why this is? 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