sadly im kinda new to this so its the only way i new i could try another way. could you go into more detail
todda2008
Posts
-
modifying and displaying text from text file depending on content -
how to getdim money as integer money = 1000000
-
modifying and displaying text from text file depending on contenthi, sorry if this sounds a stupid question but im a beginer so bare with me this is my first non guide based project. im writing a program that creates a batch file from user entered data. it then runs and saves the batch file text + result as a text file. it then displays the text file in a textbox. this was fine but im trying to develop it further so i now need it to be more simple for the user with more features. the user can now choose how many times (1-10) the batchfile requests the data. this works well but the data returned is a complicated unformatted mess. i would like if possible for the program to read the final text file and return simple formatted results. eg: instead of "exact returned result for 5x run.. Pinging 192.168.1.1 with 32 bytes of data:Reply from 192.168.1.1: bytes=32 time=24ms TTL=64Reply from 192.168.1.1: bytes=32 time=3ms TTL=64Reply from 192.168.1.1: bytes=32 time=3ms TTL=64Reply from 192.168.1.1: bytes=32 time=3ms TTL=64Reply from 192.168.1.1: bytes=32 time=3ms TTL=64Ping statistics for 192.168.1.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 3ms, Maximum = 24ms, Average = 7ms i would prefer just ping to 192.168.1.1 sucessful 3ms ping to 192.168.1.1 sucessful 3ms ping to 192.168.1.1 sucessful 3ms ping to 192.168.1.1 sucessful 3ms ping to 192.168.1.1 sucessful 3ms and to say it failed for eg: "ping to 192.168.1.1 failed" i know theres more possible results but i'll sort that out later. i havnt a clue how to do this ive looked high and low but nothing works how i want as the data is completely different everytime. heres the process code so you can see where im at.. the reason its doubled up is it can ping to IP and name, i just found it easyier that way Private Sub Button1_Click() Handles Button1.Click Dim pingamount As Integer pingamount = NumericUpDown1.Value If RadioButton1.Checked = True Then If TextBox1.Text.Length = 0 Or TextBox2.Text.Length = 0 Or TextBox3.Text.Length = 0 Or TextBox4.Text.Length = 0 Then MsgBox("please enter a valid IP address") Else : TextBox5.Text = "" If Form3.TextBox1.TextLength = True Then Form3.Close() Dim fs As New FileStream("C:\ping.bat", FileMode.Create, FileAccess.Write) Dim s As New StreamWriter(fs) s.WriteLine("ping.exe -n " & pingamount & " " & TextBox1.Text & "." & TextBox2.Text & "." & TextBox3.Text & "." & TextBox4.Text & ">C:\ping.txt") s.Close() Shell("C:\ping.