Jump to content
Sign in to follow this  
DumbLemming

Streaming in text

Recommended Posts

DumbLemming

I have a chat window that I'd like to run comparisons for each line of text, every time it updates, how would I go about doing this?

Share this post


Link to post
Share on other sites
exodius

I have a chat window that I'd like to run comparisons for each line of text, every time it updates, how would I go about doing this?

Do you have an example of the script that you're using to get the text from the chat window?

Share this post


Link to post
Share on other sites
DumbLemming

Do you have an example of the script that you're using to get the text from the chat window?

I've only figured out how to get the entire window of text using WinGetText("Text", "") . I don't know how to go through it and compare it line by line, and it seems clumsy having it load all that information again to do a comparison and check for new lines.

Share this post


Link to post
Share on other sites
exodius

I've only figured out how to get the entire window of text using WinGetText("Text", "") . I don't know how to go through it and compare it line by line, and it seems clumsy having it load all that information again to do a comparison and check for new lines.

Is there a particular control in the window you can read from using ControlGetText?

I think the problem you'll find is chat programs usually utilize an Edit-like control (either an Edit control or an IE object) to display the text in the chat. The problem of course with reading in the text of the convo is if it never gets cleared out, over time, you're going to have a lot of text to read through, and that'll slow down your script.

Depending on what you're trying to do, if you can clear out the text after you read it in, that would be ideal... Otherwise, I'm sorry to say, it probably won't work because what you're trying to read is probably like trying to read the text in a notepad window.

Share this post


Link to post
Share on other sites
DumbLemming

Is there a particular control in the window you can read from using ControlGetText?

I think the problem you'll find is chat programs usually utilize an Edit-like control (either an Edit control or an IE object) to display the text in the chat. The problem of course with reading in the text of the convo is if it never gets cleared out, over time, you're going to have a lot of text to read through, and that'll slow down your script.

Depending on what you're trying to do, if you can clear out the text after you read it in, that would be ideal... Otherwise, I'm sorry to say, it probably won't work because what you're trying to read is probably like trying to read the text in a notepad window.

Not really a chat program, it's a text window for a game. I wanted to make a trigger so that when it sees "Tell a joke" I tell a joke. I was hoping for a way to stream in text as I receive it.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.