michaelslamet Posted March 5, 2011 Share Posted March 5, 2011 Hi, I need to read content of GuiCtrlCreateEdit line by line. I know I can read the whole content using GUICtrlRead, but this time I need to read the content each line until end of content. Maybe read them and put them on array ? Would somebody here show me how to do it? Just give me a clue or function name or maybe a little example code and I will figure it out Thanks a lot Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 5, 2011 Share Posted March 5, 2011 Just read the whole thing and use StringSplit() to break it into an array of lines. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
michaelslamet Posted March 5, 2011 Author Share Posted March 5, 2011 Just read the whole thing and use StringSplit() to break it into an array of lines.Thanks PsaltyDS, works great Another question:let say the editbox has line without text, only CRLF, for example this is the content of the editbox:line1: aline2: bline3: cline4: @cRLFline5: @CRLFline6: dline7: @CRLFline8: @CRLFWhen I split it with StringSplit using @CRLF as delimiter, I got 8 result which is I dont want. I only want line1, line2, line3 and line6. I dont want lines that only contain @CRLF. Any clue how to do that?Thanks a lot Link to comment Share on other sites More sharing options...
smartee Posted March 5, 2011 Share Posted March 5, 2011 You can iterate through the array using one of the loop structures and delete blank entries. Link to comment Share on other sites More sharing options...
michaelslamet Posted March 5, 2011 Author Share Posted March 5, 2011 You can iterate through the array using one of the loop structures and delete blank entries.I finally check if each array contain only whitespace or @CRLF. if yes then I bypass and go next array contain.Thanks Smartee 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