Sign in to follow this  
Followers 0
epo

read line until ':' sign

5 posts in this topic

i want to read a few proxy line in file.txt but stop it before ':' symbol

111.222.333.444:8080

11.2.3.44:80

111.22.33.44:8181

so the result should be

111.222.333.444

11.2.3.44

111.22.33.44

i don't have a problem if the file look like this

111.222.333.444:8080

131.222.373.484:8080

141.252.353.494:8080

how to read in autoit? tqvm.

Share this post


Link to post
Share on other sites

you can put them in iniFormat and use IniReadSection with StringSplit


[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites

tq all... mission accomplished...

While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    $result = StringSplit($line, ":")
    $ipaddres = $result[1]
    MsgBox(0, "Line read:", $ipaddres)
Wend

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