mentosan Posted October 20, 2008 Share Posted October 20, 2008 Hello I'm looking for help in creating a script which search in a txt file for 2 strings "Type=9" and "Type=17" . The script should calculate how many times "Type=9" and "Type=17" appears and at the end gives/prints a result : "Found xxx forms of Type=9" and "Found xxx forms of Type=17" Link to comment Share on other sites More sharing options...
Zedna Posted October 20, 2008 Share Posted October 20, 2008 (edited) Use StringReplace()Return ValueReturns the new string, the number of replacements performed is stored in @extended Edited October 20, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mentosan Posted October 21, 2008 Author Share Posted October 21, 2008 Can you provide more help ? I'm new into this. Thank you Link to comment Share on other sites More sharing options...
Zedna Posted October 21, 2008 Share Posted October 21, 2008 $text = FileRead('c:\test.txt') StringReplace($text, "Type=9", '') MsgBox(0,'result','Found ' & @extended & ' forms of Type=9') Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mentosan Posted October 21, 2008 Author Share Posted October 21, 2008 Cheers Zedna ! 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