mentosan Posted October 20, 2008 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"
Zedna Posted October 20, 2008 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
mentosan Posted October 21, 2008 Author Posted October 21, 2008 Can you provide more help ? I'm new into this. Thank you
Zedna Posted October 21, 2008 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
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