Results 1 to 5 of 5
  1. #1
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic

    [help] Spliting like irc

    Code:
    Private Sub cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click
    
            If txtPost.Text <> "" Then
                If txtUsername.Text <> "" Then
                    
                
                    ShoutBox.AddPost(frmMain.txtLid.Text, txtPost.Text, )
                    txtPost.Text = ""
    
                Else
    
                End If
    
            Else
                MsgBox("Please fill in a post.", MsgBoxStyle.Information)
            End If
        End Sub
    this is the submit chat code

    how would i split the text so i can code irc type commands

    such as

    /title {input}

    | = split

    i want to split the / | my.settings.title | "{input}"

    and the
    if txtpost.text = "/title" split {input} then
    lable1.text = "{output}"
    end if

    please and thankyou
    Last edited by cosconub; 01-16-2011 at 03:00 AM.

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  2. #2
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by cosconub View Post
    Code:
    Private Sub cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click
    
            If txtPost.Text <> "" Then
                If txtUsername.Text <> "" Then
                    
                
                    ShoutBox.AddPost(frmMain.txtLid.Text, txtPost.Text, )
                    txtPost.Text = ""
    
                Else
    
                End If
    
            Else
                MsgBox("Please fill in a post.", MsgBoxStyle.Information)
            End If
        End Sub
    this is the submit chat code

    how would i split the text so i can code irc type commands

    such as

    /title {input}

    | = split

    i want to split the / | my.settings.title | "{input}"

    and the
    if txtpost.text = "/title" split {input} then
    lable1.text = "{output}"
    end if

    please and thankyou
    I don't get what you're trying to say lol. Needs moar English

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  3. #3
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    let me some it up...

    i want to beable to type

    /title mytext in to my chatbox and click submit
    and instead of posting it changes lable1.text to mytext

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  4. #4
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Dim yourstring as string = "/title blubb"
    Dim x() as string = yourstring.split(" ")

    msgbox(x(1))

    If that does not work, use regex.split.



  5. The Following User Says Thank You to Blubb1337 For This Useful Post:

    cosconub (01-16-2011)

  6. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Or something like this:

    [php]
    If TextBox1.Text.StartsWith("/") Then
    Dim firstInd As integer = TextBox1.Text.IndexOf(" "c)
    Dim command As String = TextBox1.Text.Substring(1, firstInd)
    Dim content As String = TextBox1.Text.SubString(firstInd+1)
    If command.ToLower = "title" then
    Label1.Text = content
    End If
    End If
    [/php]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. The Following User Says Thank You to Jason For This Useful Post:

    cosconub (01-17-2011)