Results 1 to 3 of 3

Thread: finding strings

  1. #1

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    i need to be able to find all instances of
    ' } CHATSTR " '
    then get the text inbetween " " here's how the text looks
    } CHATSTR "command" == IF
    I would need to find command and add it to a menu. The menu name is Scripts. Remember I need to find all commands in the entire file. Thanks and please include source code.


    ------------------
    DiGiTaIErRoR

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Galway, Ireland
    Posts
    316

    Post

    Here you go
    This will do what you want

    Open "c:\john.txt" For Input As 1
    Dim mydata As String
    Dim search_string As String
    search_string = "}CHATSTR "
    Do While Not EOF(1)
    Line Input #1, mydata
    look = InStr(1, mydata, search_string, 1)
    If look <> 0 Then
    mydata = Mid(mydata, look + 10)
    mydata = Mid(mydata, 1, (InStr(1, mydata, Chr(34), 1) - 1))
    MsgBox (mydata)
    End If
    Loop
    Close #1


  3. #3

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    that would work great if it opned the file but the text is aready in a text box.

    ------------------
    DiGiTaIErRoR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width