chemboy Posted March 10, 2011 Posted March 10, 2011 (edited) Hi, im having a problem reading every line in Edit Box. Here is source: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> Global $Form1 = GUICreate("Part of AoB generator", 298, 332, 192, 124) Global $text = GUICtrlCreateEdit("", 0, 0, 297, 257) Global $Button1 = GUICtrlCreateButton("Generate", 8, 264, 75, 25, $WS_GROUP) Global $Input1 = GUICtrlCreateInput("", 8, 304, 281, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 EndSwitch WEnd What i want is read lines from GUI Edit that has "//" in front, and add those lines to Input without a beginning of "//", and do this with every line in Edit. For example: "blah blah blah" // text1 "blah blah blah" // text2 "blah blah blah" should give text1 text2 Any suggestions? :/ Edited March 10, 2011 by chemboy
JohnOne Posted March 10, 2011 Posted March 10, 2011 Right now, all you have is a gui, have you attempted anything at all? All to often you get a string of replies only for the OP to proclaim they "tried all those suggestions first and they didnt work" If you have not tried anything, first thing you need is GUICtrlRead() <- help file and look at stringsplit()/_stringexplode(), and stringinstr() to get you started. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
chemboy Posted March 10, 2011 Author Posted March 10, 2011 looks like _StringExplode(GUICtrlRead($text), "") helps but what i should put as "delimiters" to make string as one line?
JohnOne Posted March 10, 2011 Posted March 10, 2011 Try @LF or @CR or @CRLF as your deliminaters AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
chemboy Posted March 10, 2011 Author Posted March 10, 2011 (edited) Yeah, @CRLF helpped, thank you Edited March 10, 2011 by chemboy
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