Div Posted February 10, 2008 Share Posted February 10, 2008 I've been using AutoIT for a good two years and while I'm not an expert, I like to consider myself at least a novice. I'm currently deployed to Iraq and I have been challenging myself with different goals for my AutoIT scripts, however, I've hit a roadblock. I want to get the cards that come out on the flop, turn and river in a poker game. I have a couple of ways to accomplish this, however, I don't which one would be best. Here's my options as I see them: + use an OCR (I can't seem to find one that compares images for a match, only one that recognizes text in an image) + glean the information from the textbox (This will work, however, there is also alot of garbage in this textbox to weed through) + use PixelChecksum (I don't think this will even work as I have read multiple times that it only shows a change in a range of pixels) + find the memory pointers for the cards (I beat my head against the wall for about four hours trying this one) That's all I can think of. I'm leaning towards the textbox method, since I have a good amount of experience using the string function in AutoIT. I just wanted to see if anyone had any unturned stone when approaching this problem before I devoted the time to a specific approach. You know what they say: Two heads (or two hundred) is better than one. Very Respectfully, Div Al Taqaddum, Iraq Link to comment Share on other sites More sharing options...
Tomb Posted February 10, 2008 Share Posted February 10, 2008 (edited) I've been using AutoIT for a good two years and while I'm not an expert, I like to consider myself at least a novice. I'm currently deployed to Iraq and I have been challenging myself with different goals for my AutoIT scripts, however, I've hit a roadblock. I want to get the cards that come out on the flop, turn and river in a poker game. I have a couple of ways to accomplish this, however, I don't which one would be best. Here's my options as I see them: + use an OCR (I can't seem to find one that compares images for a match, only one that recognizes text in an image) + glean the information from the textbox (This will work, however, there is also alot of garbage in this textbox to weed through) + use PixelChecksum (I don't think this will even work as I have read multiple times that it only shows a change in a range of pixels) + find the memory pointers for the cards (I beat my head against the wall for about four hours trying this one) That's all I can think of. I'm leaning towards the textbox method, since I have a good amount of experience using the string function in AutoIT. I just wanted to see if anyone had any unturned stone when approaching this problem before I devoted the time to a specific approach. You know what they say: Two heads (or two hundred) is better than one. Very Respectfully, Div Al Taqaddum, Iraqi personally would $x = GuiCtrlCreatePic("card1.bmp") the cards and you can recognize that card by its handle $x Edit: also if you need the card pics, you can open spider solitare with resource hacker and just save them all Edited February 10, 2008 by Tomb616 Link to comment Share on other sites More sharing options...
Linux Posted February 10, 2008 Share Posted February 10, 2008 Hi Div! I'm not an expert, and I'm far helping you. but his topic let me very curious. Good question! You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!" Link to comment Share on other sites More sharing options...
Div Posted February 10, 2008 Author Share Posted February 10, 2008 i personally would $x = GuiCtrlCreatePic("card1.bmp") the cards and you can recognize that card by its handle $x Edit: also if you need the card pics, you can open spider solitare with resource hacker and just save them all I've got the install file with all the card images in it, however, I'm not following your code. I need to recognize what cards are already displayed in the game window and then compare them to alll the card images to find a match. Will this code do this for me? VR, Div Link to comment Share on other sites More sharing options...
Tomb Posted February 10, 2008 Share Posted February 10, 2008 (edited) I've got the install file with all the card images in it, however, I'm not following your code. I need to recognize what cards are already displayed in the game window and then compare them to alll the card images to find a match. Will this code do this for me? VR, Divyou could always use GuiCtrlSetState(@SW_SHOW, $card1) where $card1 = GuiCtrlCreatePic("card1.bmp", 40, 20, -1, -1) to show a card, and use GuiCtrlGetState to see if it is shown, as like a check. Edited February 10, 2008 by Tomb616 Link to comment Share on other sites More sharing options...
Div Posted February 10, 2008 Author Share Posted February 10, 2008 you could always use GuiCtrlSetState(@SW_SHOW, $card1) where $card1 = GuiCtrlCreatePic("card1.bmp", 40, 20, -1, -1) to show a card, and use GuiCtrlGetState to see if it is shown, as like a check. Thanks for your help. VR, Div Link to comment Share on other sites More sharing options...
Tomb Posted February 10, 2008 Share Posted February 10, 2008 sure no problem i have been creating a rpg called "Toby's Quest" about my dog Toby, and in doing so i am getting a very good understanding of the concepts used in game creation via autoit. 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