Joseph001 Posted January 3, 2007 Share Posted January 3, 2007 Hi i am trying to make myself an odds calulator for poker. I am having trouble extracting the data i need. All that i have to work with is text, every time it is someones turn it adds a new line of text at the bottom and this line is what i want to extract to be able to able to work with. Dealer: Starting new hand: #2971739923 Dealer: Trexx posts small blind £0.15 Dealer: Daxx posts big blind £0.25 Dealer: gvoxx folds Dealer: maxx folds Dealer: 3xxx folds Dealer: Anxxfolds Dealer: Boltxx folds Dealer: infxxx raises £0.50 <------------- New lines are added here this text is in a control that i can read. Could anyone point me in the right direction how to take just the last line of text and when a new line appears it will know that it has changed and then extract that one. Cheers for any help if anyone understands what i'm on about Link to comment Share on other sites More sharing options...
Fossil Rock Posted January 3, 2007 Share Posted January 3, 2007 research these.... ControlGetText StringSplit StringInStr Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
DaleHohm Posted January 3, 2007 Share Posted January 3, 2007 Is this a web app? a Java app? a Win32 app? where is the data displayed? What have you tried so far? What worked and what didn't? Can you show some code? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 Hi thanks fo the quick reply i know how to use these controls ControlGetText, this one take all the text and i only want the last line of the text StringSplit , i dont think i could use this the text gets very long after a while of play there would be to many StringInStr, i know how this works i can only use this if i have got the last line of text Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 I think its a java app, the data is displayed in a control box that i can read from control get text. It was an idea i come up with today i havent started to write the code yet Link to comment Share on other sites More sharing options...
Fossil Rock Posted January 3, 2007 Share Posted January 3, 2007 Hi thanks fo the quick replyi know how to use these controlsControlGetText, this one take all the text and i only want the last line of the textStringSplit , i dont think i could use this the text gets very long after a while of play there would be to many StringInStr, i know how this works i can only use this if i have got the last line of textI've already done what you are wanting.... being your first post I wasn't inclined to post the code.However I will give you some pointers ....I use ControlGetText to get all the text.The StringSplit cuts it up into lines, then I read the last 10 lines into an array then process them. The reason I get 10 lines at a time is so if a lot of lines scroll by quickly I'll be able to guarantee I won't miss any lines (which can screw up you calculations).The StringInStr allows you to analyze each line ( in a loop ) for what you are looking for.As I've mentioned, I've done it already and it's not too difficult. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 Hmm Thanks, do you only start the calculations when its your turn? or real time? Link to comment Share on other sites More sharing options...
Fossil Rock Posted January 3, 2007 Share Posted January 3, 2007 I didn't get that far. I only used it to keep track of cards that had been played. It actually shows a pattern after a couple dozen hands on what cards are being played the most. I know the decks are completely random and all that stuff, but I won a good number of hands based on the cards being played the most. Here's a graphic of the program. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 Fossil Rock I am using one of the cryptologic sites. After a while of game play the text box could be around 200+ lines of text how do i get the last ten when the numbers are constantly changing? Link to comment Share on other sites More sharing options...
Fossil Rock Posted January 3, 2007 Share Posted January 3, 2007 What's the site? I'll have to look at it. I program is based on the PartyPoker client. I don't have much need for it now that Bushnikov has taken away online gambling. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 lol Is there an array count? So that i can get the last ten numbers from that? the site is williham hill poker Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 Oh yeah just found it $array[0] contains the number Ill give it a go Link to comment Share on other sites More sharing options...
Joseph001 Posted January 3, 2007 Author Share Posted January 3, 2007 Oh yeah just found it $array[0] contains the number Ill give it a go Link to comment Share on other sites More sharing options...
west Posted September 9, 2007 Share Posted September 9, 2007 I've already done what you are wanting.... being your first post I wasn't inclined to post the code.However I will give you some pointers ....I use ControlGetText to get all the text.The StringSplit cuts it up into lines, then I read the last 10 lines into an array then process them. The reason I get 10 lines at a time is so if a lot of lines scroll by quickly I'll be able to guarantee I won't miss any lines (which can screw up you calculations).The StringInStr allows you to analyze each line ( in a loop ) for what you are looking for.As I've mentioned, I've done it already and it's not too difficult.mmm i think i will need more explanation for thisi am trying to do someting who will use this way of coding but i am new to coding and i am a little bit confusei try do seomting who will read text in a chat room for a "trivia bot" problem is i only can read the last line of textso i am missing text loli am planing to read the text from each users SENDas an example a users send text in the room is like NICK : bla blahow i can read from the NICK : and to the end of line of text he post???Thanks 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