mike1212 Posted March 7, 2005 Share Posted March 7, 2005 (edited) Hello What I am trying to do here is count the number of opened seats. Then execute an action. So I wrote this request code if $Count < 3 Then WinActivate($tablename); return 5; endif To trigger the #5 instruction in the main loop. Code as is now xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Func OccupiedSeats() Local $Count = 0 ;Seat 1 If (PixelGetColor(529,58 ) == 8261908 ) Then $Count = $Count + 1; EndIf ;Seat 2 If (PixelGetColor(672, 122) == 6360079) Then $Count = $Count + 1; EndIf ;Seat 3 If (PixelGetColor(757,215 ) == 8000019) Then $Count = $Count + 1; EndIf ; Seat 4 If (PixelGetColor(681,372 ) == 9639705) Then $Count = $Count + 1; EndIf return $Count; EndFunc xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Question Where should I insert the code I wrote? if $Count < 3 Then WinActivate($tablename); return 5; endif And does this look right? Thank You Mike Edited March 7, 2005 by mike1212 Link to comment Share on other sites More sharing options...
phillip123adams Posted March 7, 2005 Share Posted March 7, 2005 if $Count < 3 Then WinActivate($tablename); return 5;endif return $Count;Where should I insert the code I wrote? And does this look right?Thank You Mike <{POST_SNAPBACK}>Yes, your code looks okay. If I understand correctly, I think this is what you are looking for:Func OccupiedSeats() Local $Count = 0 ;Seat 1 If (PixelGetColor(529, 58) == 8261908) Then $Count = $Count + 1; EndIf ;Seat 2 If (PixelGetColor(672, 122) == 6360079) Then $Count = $Count + 1; EndIf ;Seat 3 If (PixelGetColor(757, 215) == 8000019) Then $Count = $Count + 1; EndIf ; Seat 4 If (PixelGetColor(681, 372) == 9639705) Then $Count = $Count + 1; EndIf If $Count < 3 Then WinActivate($tablename); Return 5; Else Return $Count; EndIf EndFunc ;==>OccupiedSeatsBTW, when you post code, if you place it within "CODE" and "/code" (square brackets could not be shown) it makes it much easier for everyone to read and work with it. Althouth if it's only a few lines it doesn't much matter. Phillip Link to comment Share on other sites More sharing options...
therks Posted March 7, 2005 Share Posted March 7, 2005 Dude, use the tags. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
phillip123adams Posted March 7, 2005 Share Posted March 7, 2005 Somethings not right it seem like its not returning a count,<{POST_SNAPBACK}>I can't actually test your script because I do not have the window it manipulates. However, I can see that there is nothing calling function OccupiedSeats. Phillip Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2005 Moderators Share Posted March 7, 2005 Ut oh David, your script is out in the open!!, better get admin to delete it...lol, hey look the script would work, if it had a function do do something other than look for pixels and return a count. Once it finds the pixels, where does it return the count to? Just sit manually, and watch your bot play. By the way, if you'd like to test it in "Real Money", I'll play it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mike1212 Posted March 7, 2005 Author Share Posted March 7, 2005 Ut oh David, your script is out in the open!!, better get admin to delete it...lol, hey look the script would work, if it had a function do do something other than look for pixels and return a count. Once it finds the pixels, where does it return the count to? Just sit manually, and watch your bot play.By the way, if you'd like to test it in "Real Money", I'll play it.<{POST_SNAPBACK}>Hi RonWhat do you think about vex and sparbot ?I play them and the program does ok.Poker Academy claim they are the best.I think there better then most winholdem programs.Mike Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2005 Moderators Share Posted March 7, 2005 Hi RonWhat do you think about vex and sparbot ?I play them and the program does ok.Poker Academy claim they are the best.I think there better then most winholdem programs.Mike <{POST_SNAPBACK}>I've read about both, both from same company. Also POKI bot (sounds most impressive if integration is possible"), I was unaware that "vex" or "sparbot" were able to be integrated into pokersites currently for actual bot play.So, I can only say that the literature was ineresting, for I don't have either.Ron Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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