Jump to content

Real Time Text


Recommended Posts

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

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

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

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

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.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

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!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

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!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

  • 8 months later...

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 this

i am trying to do someting who will use this way of coding but i am new to coding and i am a little bit confuse

i 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 text

so i am missing text lol

i am planing to read the text from each users SEND

as an example a users send text in the room is like NICK : bla bla

how i can read from the NICK : and to the end of line of text he post???

Thanks

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...