
CODE: [Copy to clipboard]readtext("202.99.12.98:8080")
readtext("33.11.24.67:80")
sub readtext(text)
s=split(text,":")
msgbox "a=" & s(0) & vbcrlf & "b=" & s(1)
end sub
CODE: [Copy to clipboard]Dim MyVar,f,fso,ln,fl,IP
Set fso = CreateObject("Scripting.FileSystemObject")
Set f=fso.OpenTextFile("2.txt",1)
Do While f.AtEndOfStream <> True
ln=f.ReadLine
fl=InStr(1,ln,":",1)
IP=Left(ln,fl-1)
MyVar=Right(ln,Len(ln)-fl)
msgbox "IP="&ip&vbCrLf&"端口="&MyVar
Loop
f.Close
Set f=Nothing
Set fso=Nothing
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |