Results 1 to 4 of 4

Thread: GetStringBetween Help

Hybrid View

  1. #1

    Joined
    Feb 2012
    Posts
    223
    Userbars
    4
    Thanks
    72
    Thanked
    44/13
    DL/UL
    60/2
    Mentioned
    29 times
    Time Online
    1d 21h 39m
    Avg. Time Online
    N/A

    GetStringBetween Help

    So I want to get the DOB of my account, but there are like 10 things that have "</td><td>", "</td></tr>" Is there any way to tell it like (5, "</td><td>", "</td></tr>") so it would get the fifth one?

  2. #2
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,722
    Userbars
    166
    Thanks
    5,907
    Thanked
    33,078/6,609
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 5h 38m
    Avg. Time Online
    3h 13m
    Think outside the box...

    Grab a portion of the string that contains the birthdate, then do another getbetween grabbing the birthdate.

    Code:
    Data = GetStringBetween(strHTML, "<b>Date of Birth</b><br>", "</td></tr>")
    Data = Replace(Data, "</td><td>", "")
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  3. The Following User Says Thank You to j03 For This Useful Post:

    jojo (03-21-2012)

  4. #3

    Joined
    Feb 2012
    Posts
    223
    Userbars
    4
    Thanks
    72
    Thanked
    44/13
    DL/UL
    60/2
    Mentioned
    29 times
    Time Online
    1d 21h 39m
    Avg. Time Online
    N/A
    Thank you so much!
    Last edited by jojo; 03-21-2012 at 02:11 PM.

  5. #4
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Code:
    Public Function GetBirthday(strHTML As String) As String
        Dim startIndex As Long
        startIndex = InStr(1, strHTML, "<b>Date of Birth</b>")
        If startIndex = 0 Then
            GetBirthday = "Birthday not found"
        Else
            GetBirthday = Mid$(strHTML, startIndex + 35, 10)
        End If
    End Function
    Is the most reliable way...

  6. The Following User Says Thank You to Zachafer For This Useful Post:

    Ryan~ (03-21-2012)

Posting Permissions

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