1

I know there isn´t an answer for this, but i´m a nooby at computer ingeniering and I want to know what I should read or study about for being capable to interact with a desktop client software. Here is an example:

I play poker, and I want to be able to interact with my poker client, I don´t want to do any fancy or anything ilegal such a bot. For example I want to have a program that reads my hands and after playing be able to analize some of the hands or maybe some HUD Helper online.

For those who play poker I´d like to be able to autoseat in some tables automatically or have a mini HUD telling me my BB and my oponents. I know that there very good progrmas for this and I use them. Just I wanto to learn how to read info from this clients and how to interact with them. I talk about poker but I want to learn how to interact with other programs. If anyone could tell me where to begin my studys it would be nice to know something even if I never put my Knowledge in practice. Just i like to know how things work.

PS: Should I use C/C++? I ´ve learned Java and now I am learning Python and JS.

I hope I explained myself, sorry about my English. And thank you.

1 Answers1

1

There are several alternatives to interact with a poker client, more or less difficult or sophisticated, and effective depending on what you want to accomplish.

For getting the information you could sniff the data over the network, inject your code via API hooks, read the information with screen scraping and OCR, parse the hand histories...

To emulate user actions you can programmatically perform mouse clicks and and key strokes, send messages directly to the UI components of the poker client, or even interact directly with the poker server sending it the expected information by your own(this option, as well as sniffing the data from the network to get the information, may be quite difficult since you will have to deal with (maybe private) protocols, data encryption, etc).

If you know Java, give it a try to the awt's Robot class. With it you can read pixels of the screen, get screen captures, perform mouse clicks and key strokes... I am sure that there are similar tools in Python but don't know about them.

Another higher level tool used for UI automation is Sikuli. It may be useful for your purpose.

I hope this information is useful for you.

e1985
  • 6,239
  • 1
  • 24
  • 39
  • Thank you very much for your answer. I will begin to try Robor class on Java and to learn how to sniff data from the network. The problem is when I search for Screen Scrapping "my friend" google always shows me results on web scrapping, so I´m a bit lost to know what teconology or language to use. The same for data sniffing over the network, but that is because I´m a nooby so I have a huge way ahead but I thing this project is a great way to learn computer science. – Carlos Loureda Jun 07 '13 at 12:11
  • As I told you before, sniffing data may be quite difficult since the data the poker client is receiving is most probably encrypted... You better try screen scraping or hand history parsing. Some poker clients show you the hand's events in the chat, so maybe you can use the Robot class to select that text, copy it in the clipboard and then parse it to get the information... It's just an idea. I have only used pixel/image matching and OCR, with the mentioned class, and it worked fine more or less. Also have a look to Sikuli, I am sure it may be useful, and you can use it from a Java I think. – e1985 Jun 09 '13 at 09:39
  • Thanks again for your answer. Sorry about not answering before, I was preaparing some exams and didn´t have the time to check Robot class and Sikuli. I´ve been trying them out and they are very nice tools. Now I have to try to parse the text on the chat. For those things is where I need an OCR library for Java. Now i´m looking for them in other topics. Next future step is a tool for sniffing data, but little by little, by now I have good things to play with. Thanks for your answer. – Carlos Loureda Jun 19 '13 at 22:15