One truth I have discovered for sure: when you believe that all things are possible and you are willing to work hard to accomplish your goals, you can achieve the next "impossible" dream. No dream is too high!
im trying to code a poker odds calculator,the basics of this i can handle but im wanting to add an auto read feature to auto-read the cards on the table ( as to allow the user a hands free use of the program) and i was wondering how would i use api to read the cards? and what would be a good method for making the program check/bet or fold depending on the odds? could i use api to check or uncheck the checkboxes of the poker table software? Answer from Richard Rost:
Good luck. I built something like this YEARS ago to run with my favorite poker site's program, and I got it to work, but it took a LOT of time and I found in the end that it really wasn't worth it.
The approach that I used was taking a screen shot of specific locations (my hole cards and the board cards) and the comparing them with a checksum to known values for each card (Ad, 2d, 3d, etc.) That's how I could tell what cards were up.
Then, I found API calls to move the mouse and click it, so I had to figure out the exact screen positions of each of the buttons - when they were visible, and when to click.
It's a LOT of work, but it's the only way I could think of to do it. The poker sites do NOT want automated bots playing poker so they make it hard. I would guess at least once a month they would make real subtle changes to the images in their software and I'd have to reprogram the whole thing.
I gave up after a couple of months… and this was just a hobby of mine. I'm not a serious card player. I just wanted to do it "just to do it." Well, I did it. It worked good for a little while… but it wasn't worth the continued effort to support the software.
So to answer your question… YES, it's possible. You'll need APIs to capture an area of the screen, move the mouse, click the mouse, WAIT a number of seconds, and all that jazz. I was able to find the code all online for free… and NO, I don't believe I still have a copy of my program anywhere I can find it easily. :)
Good luck.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.