Reading Text From Another Application

Jun 18, 2009

I have an application that telnets into a server and we ping a bunch of IPs. What Im needing to do is it will automatically ping it like "ping iphere" the output looks like "64 bytes from machine&hostnamehere (iphere ): icmp_seq=0 ttl=121 time=60 ms. What Im needing to know is how I can read those lines then if it "iphere" matches the pinged ip it will update my txt file.

[Code]...

View 2 Replies


ADVERTISEMENT

Reading Text From Another Console Application

Jun 18, 2009

I have an application that telnets into a server and we ping a bunch of IPs. What I need to do is it will automatically ping it like "ping iphere" the output looks like "64 bytes from machine&hostnamehere (iphere): icmp_seq=0 ttl=121 time=60 ms. What I need to know is how I can read those lines then if it "iphere" matches the pinged ip it will update my txt file. The only thing I need is reading the lines to see if it pings. One thing is if it doesnt ping it doesn't say anything its just empty space.

View 4 Replies

Reading A Text File With An External Application?

Jul 22, 2009

I have this application that I need to read a text file.

I have designed a form which has a play button and when the play button is called it is supposed to read a text file which has being created using an external application..

I wrote a code that calls the application but I dont know how to pass the text file into the application.

I also dont want the application popping up.

line of code that calls the application ---- Process.Start("C:Program FilesDECtalkUSsay.exe")

View 3 Replies

Reading, Then Using, Then Reading Text File?

Jan 2, 2010

I am working on a project in VB 2008 and need it to do this:Read first line from text file (using Openfile)Enter line into textbox on formDo some other codeThen Read second linefrom text fileEnter line into same text boxand loop until we have gone through text fileI am not sure how to read line by line from text file then enter it in textbox. I can open the Openfile and get the filename and everything, but I just am not sure how to read from it or enter that line into the textbox.Here is what I have, its not much but its a start:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim FileReader As StreamReader

[code]....

View 4 Replies

Reading A Specific Line From A Text File And Displaying It In Individual Text Boxes?

Feb 16, 2010

I've been writing a weight program for flooded pressure vessels and I'm having trouble retrieving the data from the text files I've been saving. I know how to write the data to the text file, but retrieving it with OpenFileDialog is not so easy for me.The user has individual text boxes that they input strings or numbers into and when they save the file, each text box input is written to one line in the text file. For example, the first text box is for the username, therefore the first line of text that is saved is the person's name, the second text box is the customer, thus the second line in the text file is the customer name, and so on.

(Actually, the first line of text in the saved file designates whether English units were used or Metric units because when the user retrieves the saved file, English units will open one form and Metric units will open a separate form, so some If...Then statement will need to occur).I need to be able to read the first line, have either my "EnglishForm"form open or my "MetricForm" form open, and then have each subsequent line of text be displayed in their corresponding text boxes. I know I need to use ReadLine or LineInput, but I don't have a clue what to do.Assuming the syntax I've displayed below would just magically work (if only life were that easy), it would look something like this

If FirstLineOfTextInFile = "English" Then
EnglishForm.Show()
ElseIf FirstLineOfTextInFile = "Metric" Then[code]....

And so on...I read a lot of articles from the MSDN library and exhausted each link that I've looked through from Google and Bing, but most only retrieve data from the file to a single text box through some loop or streamreader and don't take into account multiple forms.

View 17 Replies

Forms :: Reading File, Split Text And Write To Text Boxes

Jun 25, 2010

I'm trying to read a text file that contains info like this:

ACX-101-011 , J2168
BTXR-130A-013, D6733
AJ4-233-614, T8211

I want to split each line at the comma and write the left side to a textbox and the the right side to another textbox. I'm close, with the code below, but I can only post results from the first line in the file. How do I loop this and append the text results in each of the textboxes.

Dim TempFile As String
TempFile = "temp.txt"
Dim sw As StreamWriter

[Code].....

View 2 Replies

Reading Comma Delimited Text Form A Text Box

Nov 27, 2007

I need to be able to read common delimited text that the user enters into a text box. For example the text box would look like this:1,200,02,200,04,120,1203,200,120I need to be able to read the lines and put the data into a multi-dimension array with all the first values in column 1, all the second values in column 2, and all the thrid values in column 3.

View 9 Replies

Reading Text From A Text File Into A Listbox

Dec 15, 2010

I'm a little new to VB, and I'm in a class for it, but I'm trying to do something we aren't going to learn in the class (mostly out of sheer interest) and I need help. I'm trying to read lines from a text file into a listbox, each line representing a new item on the listbox. For example, if the text file reads: [code]I want to be able to take that as is and read it into a listbox, where those words would appear in the exact same fashion; as a list, each as separate items. I've looked at the Help stuff and learned (sorta) about delimiters... but the thing is I don't want to write my entire list in a continuous line separated by commas--I want it to keep reading each line, and moving on to the next, until there are no more lines left. I am thoroughly stumped, and would appreciate it SO much if someone could help. For a frame of reference, this is the point I'm at now with my code: [code]Note that when I run the program, all it will do is read the first line of text available and stop; once I press ENTER in a text file, it decides to stop reading.

View 2 Replies

Reading Text From Online Text File

Jul 30, 2009

im trying to read a online txt file and its not working [code]but it has a uri error i think in doing it wrong but need help with how im doing it wrong, all i want to do is read the text from a file online not from the system should be easy.

View 1 Replies

Reading Text From Online Text File?

Jul 4, 2010

Usually, the text file that would need to be read and processed would be local (on the computer the program is run), but for this example, we need to get the data from an online text file.

I have searched on google for nearly an hour now and haven't found anything of any real use. One of the earlier projects we submitted used a similar target, and I managed to get it working fine, however I dont have the original source code with me and I cannot remember how I did it.

I believe I used a Net.WebRequest method of some sort, because I had tried using StreamReader and ended up with an URI error or something like that.

View 7 Replies

Reading Memory From An Application Don't Own In C++

Jan 26, 2012

A couple of months ago, before I started learning C++, I made an application in VB.net that reads memory from an external program. This could be anything, from notepad to windows media player etc. I have been trying to find a way to do the exact same thing in C++, but to my suprise I can't find anything straightforward on the subject. All google comes up with is threads on several forums, where the general response is "Windows doesn't allow you to read from memory you do not own". But if it works in VB.net, it can work in C++ too.

[Code]...

View 1 Replies

Application Reading Web Page - VB 2008?

Jun 29, 2009

im just wondering is it possible to do this easily as im not great at VB I have a simple webbrowser open when i click a menu item, and when it loads it goes to a text page on a online server i have (ends in .txt) which just has some text on, is it possible for me to add a button which when i press it, it searches the page for a certain number/word, then opens a message box with some text in relation to the number/text, or is this not possible with a webpage.

View 6 Replies

Reading Keydown Regardless Of Active Application?

Feb 27, 2010

I have created a program which should perform a certain action whenever a certain group of keys is pressed at the same time. The program must be able to run in the background, or in the system tray or something. Essentially, this should work like the KeyDown event on a form, except the form in this case is everything.

I'm not certain if there is a way to do this directly from within the .net API, but if there is I certainly have not found it.

View 1 Replies

VS 2008 Application Reading Webpage?

Jun 21, 2009

t possible to do this easily as im not great at VB I have a simple webbrowser open when i click a menu item, and when it loads it goes to a text page on a online server i have (ends in .txt) which just has some text on, is it possible for me to add a button which when i press it, it searches the page for a certain number/word, then opens a message box with some text in relation to the number/text, or is this not possible with a webpage.

View 5 Replies

Reading Text Box Text (batch)?

Jun 10, 2010

i am trying to create a program what reads the information from 10 different text boxes and then saves the text to the 10 separate files (one with each bit of info in it)im stuck on how i will do this though, here is my save method:

Dim PRT As New String("") 'not sure how to get this info ("")
Dim TXTBX As New String("") 'not sure how to get this info ("")
If File.Exists("PatchHelperFiles\mods\fun\color\" & PRT) = True Then

[code]....

View 1 Replies

Application That Accept The Reading From Barcode Scanner ?

Feb 10, 2012

I would like to do the application that accept the reading from Barcode scanner. What barcode scanner I should use? And, vb.net can support on that and work well?

View 6 Replies

VS 2010 Reading Excel Does Not Return Any Values In VB Application?

Apr 13, 2012

I am developing a vb.net app that should read cell values from excel. However, it is not returning any results and I thought that it would be really simple. I have imported all the references viz. Microsoft Excel 12.0 Object Library.

Following is the function in my class file which should read the excel file

Dim mobjApp As Excel.Application
Dim mobjWB As Excel.Workbook
Dim mobjSheet As Excel.Worksheet

[Code].....

View 5 Replies

Windows Application For Reading / Writing To Specific File

Jan 18, 2011

What I am trying to do is I have a .dat file that I cannot read but can at the same time. What I mean is I know how to decipher it by hand (alas takes minutes per 6 parts and there are thousands.) I am trying to make an application that can read this and allow me to edit it from my computer. I can open this with a hex program such as hex editor neo. I am currently trying to get it so I can read the file and have it place corresponding parts in to text boxes that I can alter to suit my needs.

I am new to visual basic and know a tiny bit about C++ if you think I would be better off trying in C# I can try that as well I do know some since learning c++. There are 41 parts to each item listed in the file and each one would need to go in its own text box. In hex there are 348 blocks that need to be arranged in corresponding order. Also the beginning of the file has 6 block followed by a code for each item. I need to find a way to put all the correct code in the correct text box and have it make sense.

View 7 Replies

Reading Text In VB?

Jul 18, 2011

To read a file i am using the following New to VB and I'm sure this is a basic question.To read a file I am currently using:

Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C: emp est.txt")
MsgBox(fileReader)

It works fine but I would rather it just open the text file itself, how do I do this?I currently use this code for writing files and would like it similar for reading:

Dim owrite As System.IO.StreamWriter = System.IO.File.WriteText("c: emp est.txt")
owrite.WriteLine("TEST")
owrite.Close()

View 5 Replies

Reading Connection String From Config File In Windows Application

Sep 20, 2010

I'm using vs2010 and can't get this to work. The same code has worked in earlier versions. What has changed?

config file:
<appSettings>
<add key="ConnectionString" value="Data Source=MikeLaptop;Initial Catalog=AdventureWorksDW2008R2;Integrated Security=True"/>
</appSettings>

Code:
Dim strProvider As String = ConfigurationManager.AppSettings("ConnectionString")
strProvider is always = nothing
How to do this now?

View 6 Replies

Can't Add Text After Reading A String?

Mar 30, 2012

I'm making a program that can read a game music file and able to add some texts after it.So far, this is my code:

For Each foundFile As String In My.Computer.FileSystem.GetFiles("E:O2ChinaMusic", _
FileIO.SearchOption.SearchTopLevelOnly, "*.ojn")
Dim fileName As String = IO.Path.GetFileNameWithoutExtension(foundFile) 'Filename[code]....

My problem is for example, the game music file's title is "Puberty", as you can see, my code is:

StrItm(1) = title & " INPUT TEXT HERE"

but the only one that appear is the word "Puberty" AND NOT "Puberty INPUT TEXT HERE".

View 8 Replies

Reading A Text File

Jan 25, 2010

I have a fixed width delimited text file, the data spans over several line. I do not know how to approach in reading this file and displaying its results to a gridview.

[Code]...

View 11 Replies

Reading A Text File?

Nov 29, 2009

How could i echo individual lines?, Like for example if i want to echo the hostname line, How could i just echo 'Christopher's Testing server', and not the hostname part too?

echo Executing Server Config...
lanmode 1
rcon_password changethis
password password321
maxplayers 20

[Code]...

View 6 Replies

Reading A Textfile Into A Text Box?

Jul 28, 2011

Can anyone tell me why this code isn't working? I am trying to read a textfile into a textbox with multiline = true. All i get is the first member of the list from the textfile. The rest is left blank.Public Class Form2

im myLines As New List(Of String)
Dim index As Integer = 0
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code]....

View 8 Replies

Reading And Sorting Text From A .txt?

Jul 28, 2011

Okay so I am very new to visual basic I am currently using VB 2010 I know that this is not the correct forum but I figured it was the closest to it since there is no VB 2010.Anyways I am making a program for my Dad's company that can keep track of inventory so I need to store the info in a .txt and load it up etc. I currently am using a stream writer to write to the text and I got that down pat I am just having troubles loading it back up and putting the info in specific text boxes aka sorting or parsing? the information. I have looked at several tutorials and the problem is that I just simply don't know what I am looking at I've been tinkering with it for a couple hours now with no luck so I hope you guys could help me out .

Here is my current code. It is kind of useless because I have tried so many methods I thought maybe I could use a ReadAll function have it go to a string and parse from there hoping it would have been easier but it has not worked out for me so far.

[Code]...

^This above is just the output in test.txt and what will eventually need to get sorted into respective text/list boxes .

View 5 Replies

Reading From A Text File?

Jun 10, 2011

why this doesn't work?

Public Sub LoadFile()
Dim file As StreamReader
Dim temp As String

[code].....

View 7 Replies

Reading From Many Text Files?

Mar 9, 2009

Reading from many text files

View 7 Replies

Reading From Text File

Apr 30, 2010

got this code where users created txt file with email address and password [code]

View 2 Replies

Reading From Text File?

May 29, 2012

I want to know how you would read in from a text file line BY LINE with timer and put it in a Listbox. Lets say I want to read this text from text file

1234232123
12342321
234223423421
23423233

Now i set the timer interval 300 and debug, i expect this to put each number in the listbox. I tried doing this but i failed

View 4 Replies

Reading Text-file From CD?

Jun 26, 2010

I want to check if a textfile is in a CD, read the file, and if it contains the text "blahblah", do something. If it doesn't, MsgBox("Error!"). :P I only know how to open and close the CD drive. >_<;

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved