Helixanon Posted September 26, 2016 Share Posted September 26, 2016 (edited) 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 September 26, 2016 by Helixanon Link to comment Share on other sites More sharing options...
l3ill Posted September 26, 2016 Share Posted September 26, 2016 How about using: StringSplit Then use Ubound to get the last line (array element) My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
Helixanon Posted September 26, 2016 Author Share Posted September 26, 2016 (edited) 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 September 26, 2016 by Helixanon Link to comment Share on other sites More sharing options...
l3ill Posted September 26, 2016 Share Posted September 26, 2016 No problem My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example 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