DumbLemming Posted February 15, 2009 Share Posted February 15, 2009 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? Link to comment Share on other sites More sharing options...
exodius Posted February 15, 2009 Share Posted February 15, 2009 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? Link to comment Share on other sites More sharing options...
DumbLemming Posted February 15, 2009 Author Share Posted February 15, 2009 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. Link to comment Share on other sites More sharing options...
exodius Posted February 15, 2009 Share Posted February 15, 2009 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. Link to comment Share on other sites More sharing options...
DumbLemming Posted February 15, 2009 Author Share Posted February 15, 2009 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. 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