Jump to content
Sign in to follow this  
michaelslamet

[ASK] How to read content of GuiCtrlCreateEdit

Recommended Posts

michaelslamet

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 :)

Share this post


Link to post
Share on other sites
michaelslamet

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: a

line2: b

line3: c

line4: @cRLF

line5: @CRLF

line6: d

line7: @CRLF

line8: @CRLF

When 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 :P

Share this post


Link to post
Share on other sites
smartee

You can iterate through the array using one of the loop structures and delete blank entries.

Share this post


Link to post
Share on other sites
michaelslamet

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 :)

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.