czardas Posted November 7, 2013 Share Posted November 7, 2013 With the earlier answers plus my idea, you should be able to make this work. I have no time ATM. I'm sure you'll figure it out. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Rafaelinio Posted November 7, 2013 Author Share Posted November 7, 2013 K dude thanks! worked! Link to comment Share on other sites More sharing options...
czardas Posted November 7, 2013 Share Posted November 7, 2013 (edited) K dude thanks! worked! That's good to hear For parsing lines of code, most String functions are generally useful. You may sometimes need to trim spaces from one, or both ends, of each line using StringStripWS() before doing anything else. Using more advanced features like StringRegExp() will take a lot of study, but ffirst check out all the simpler String functions and learn what they all do. That will bring you forward in your project. Good luck with this. Edited November 7, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted November 7, 2013 Share Posted November 7, 2013 (edited) Here's an example of how I might do it. ; Local $sLineFromFile = "msg NOTIFICATION, Hello World" Local $sTrimLine = StringStripWS($sLineFromFile, 1) ; Strip leading white spaces (just in case there are any) Local $aText ; Array variable to hold split line sections If StringLeft ($sTrimLine, 4) = "msg " Then $sTrimLine = StringTrimLeft($sTrimLine, 4) ; Get rid of 'msg ' $aText = StringSplit($sTrimLine, ",") ; Split the line MsgBox(0, $aText[1], $aText[2]) EndIf ; Oops, spotted two stupid mistakes. Fixed. Any questions about the code, just ask. Edited November 7, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Rafaelinio Posted November 7, 2013 Author Share Posted November 7, 2013 thanks dude 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