Jump to content
Helixanon

Working with text

Recommended Posts

Helixanon

Hello. I get the raw text from the control using this code.

ControlGetText($consoleHandle, "", "Edit2")

However, I only need the last lines, thus I am forced to write all this text into the file and then read the latest lines from the file itself.

FileWrite($path, ControlGetText($consoleHandle, "", "Edit2"))
For $i = 0 To ($linesToCheck - 1) Step +1
    $string = FileReadLine($path, _FileCountLines($path) - $i)
    ...
Next

Is there any way I can work with the text returned by ControlGetText directly w/o writing it to a file?

I searched for some TextManagement UDF but didn't find any.

Thanks in advance.

Edited by Helixanon

Share this post


Link to post
Share on other sites
Helixanon

Omg, I'm feeling really dumb right now xD

I can't understand how come I didn't think about splitting by @CRLF delimiter.

It's pretty much what I need, big thanks.

Edited by Helixanon

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

×