xZZTx Posted October 14, 2008 Share Posted October 14, 2008 (edited) Hi i have been playing with the File Read and Wright along with Ping() so i made a Multi Ping type deal only flaw is that in the txt doc it can only have the ips to ping and on the last line have END but most ips that i can get are like this ##.##.##.##:Port Number then just a bunch of nonesence over here so i was wondering of anyone could give me a way to remove everything past the : here is the script btw expandcollapse popupGlobal $N,$Time,$Address,$N2,$Saved_Address,$Num,$Ping #include <GUIConstants.au3> #include <ProgressConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Multi Ping", 248, 125, (@DesktopWidth-248)/2, (@DesktopHeight-125)/2) $Progress1 = GUICtrlCreateProgress(8, 80, 233, 25) $Label1 = GUICtrlCreateLabel("Looking Up Address's Speed", 48, 24, 141, 17) $T_N = GUICtrlCreateLabel($N, 72, 53, 22, 17) $Label3 = GUICtrlCreateLabel("Out Of", 96, 53, 35, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $Time = 1000 While 1 $N2 += 1 $N1 = FileReadLine("proxy list.txt",$N2) If $N1 = "END" Then $End = $N2 ExitLoop EndIf WEnd $T_End = GUICtrlCreateLabel($End, 136, 53, 22, 17) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch GUICtrlSetData($T_N,$N) GUICtrlSetData($Progress1,(($N/$End)*100)) $Address = FileReadLine("proxy list.txt",$N) If $Address = "END" Then $M = MsgBox(4,"Copy?","Address Number "&$Num&" Address "&$Saved_Address&" With A Ping Of "&$Time&@CRLF&@CRLF&" Do You Want To Copy To ClipBoard?") If $M = 6 Then ClipPut($Saved_Address) If $M = 7 Then Exit 2 Exit EndIf $Ping = Ping($Address,500) If $Ping = 0 Then Else If $Time > $Ping Then $Saved_Address = $Address $Time = $Ping $Num = $N EndIf EndIf $N += 1 WEnd Edited October 14, 2008 by xZZTx Sorry For Any Spelling / Grammar Errors I May Make.... I Failed English Wayyyy To Many Times.. Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 14, 2008 Share Posted October 14, 2008 You could use StringSplit() or StringRegExp(). Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
xZZTx Posted October 14, 2008 Author Share Posted October 14, 2008 Could You Give Me an Example? Sorry For Any Spelling / Grammar Errors I May Make.... I Failed English Wayyyy To Many Times.. Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 14, 2008 Share Posted October 14, 2008 Well I don't know what the expression for RegExp would be off hand but for StringSplit() you could do something like this CODEFor $i = 0 To FileCountLines($file) $test = StringSplit(FileReadLine($file,$i)," :") MsgBox(0,"info", "Your ip/port is " & $test[1]) Next Please note this is just an example and may not work but it should point you in the right direction. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
xZZTx Posted October 15, 2008 Author Share Posted October 15, 2008 o thx that's what i needed Sorry For Any Spelling / Grammar Errors I May Make.... I Failed English Wayyyy To Many Times.. 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