Sign in to follow this  
Followers 0
Rex

String split problem [SOLVED]

3 posts in this topic

#1 ·  Posted (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 by Rex

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by DMEE

In the beginning there was nothing and then even that exploded - anonymous

Share this post


Link to post
Share on other sites

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

I 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0