Rex Posted July 10, 2008 Share Posted July 10, 2008 (edited) Hi can any tell me what's wrong with this script ?? I need to replac all # with "enter" sp i did the to read and write, but i can't get i to work $split = StringSplit("202.114.32.101#202.114.32.101#202.114.32.101#202.114.32.101#202.114.32.101" , "#") $split_1 = $split[0] $i = 0 Do; creating a loop that read and write lines from input_file and to output_file $i = $i + 1 FileWriteLine("C:\IP_Filted", $split[$i]); This adds a 0 to the line before it's writen to the Output_file Until $i = $split_1; ends loop when the last line has been writen /Rex :Edit Solved, my string was too long Edited July 10, 2008 by Rex Link to comment Share on other sites More sharing options...
DMEE Posted July 10, 2008 Share Posted July 10, 2008 (edited) I would use $string = StringReplace("202.114.32.101#202.114.32.101#202.114.32.101#202.114.32.101#202.114.32.101" , "#", @CRLF) Edit: after a quick look, you're code works fine for me. Please let us know which version of autoit you use Edited July 10, 2008 by DMEE In the beginning there was nothing and then even that exploded - anonymous Link to comment Share on other sites More sharing options...
Rex Posted July 10, 2008 Author Share Posted July 10, 2008 I would use $string = StringReplace("202.114.32.101#202.114.32.101#202.114.32.101#202.114.32.101#202.114.32.101" , "#", @CRLF)Edit: after a quick look, you're code works fine for me. Please let us know which version of autoit you useI think that the reson that the code don't work with me is that my IPstring is a lot longer (i did chop it before posting), and i ges that it to long...I did a nother script that worked with StringRegExp and rewriteline thing./Rex 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