epo Posted September 5, 2008 Share Posted September 5, 2008 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 5, 2008 Developers Share Posted September 5, 2008 Something like this should do it: $result = StringSplit($record,":") $ipaddres = $result[1] Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
komalo Posted September 5, 2008 Share Posted September 5, 2008 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] Link to comment Share on other sites More sharing options...
Alek Posted September 5, 2008 Share Posted September 5, 2008 $Line = Stringleft($Line, StringInStr($Line, ":") - 1) [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
epo Posted September 5, 2008 Author Share Posted September 5, 2008 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 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