Greetings
I am on a project where the application read a text and execute commands in the text... i am having problems in the part of finding the command from the text.
So let's say i have a file with the following text :

message:Hello this is a message !
metext:New title

So when the software find a line starting with "message:" will pop up a message saying the part after the " : " on the line witch is "Hello this is a message"
If he finds a line starting with "metext:" will change the software title to "New title", (Me.text = "New title" )

P.S. : The text will be containing only one line ( only one command ) this was just an example of cases.

I hope you hot what i mean.
Please could you help me with the code ?

Thanks a lot

I got the code :

Dim lines() As String = IO.File.ReadAllLines("C:\Users\A1A4A\Desktop\text.txt")
        For Each line As String In lines
            Dim command() As String = line.Split(":")
            If (command(0) = "metext") Then
                Me.Text = command(1).Trim()
            ElseIf (command(0) = "msgbox") Then
                MsgBox(command(1).Trim())
            End If
        Next
        Console.ReadLine()

Thanks anyway ... >.>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.