matto
Member
- Joined
- Apr 2, 2007
- Sythe Gold
- 0
- Messages
- 89
Hi. I'm trying to make a highscore lookup which grabs a list of usernames from a listbox or multiline textbox, and if the total level is above 900, it puts the username in listbox/multiline textbox 2.
So far, I have managed to get a username from a textbox, then display a message in a label depending on what the total level is.
Here's my code so far:
Any help would be appreciated. Thanks
So far, I have managed to get a username from a textbox, then display a message in a label depending on what the total level is.
Here's my code so far:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim name As String = TextBox1.Text
Dim src As String 'Declares the variable that will hold the source code
Dim net As New Net.WebClient() 'Creates a new instance of a WebClient
src = net.DownloadString("http://hiscore.runescape.com/index_lite.ws?player=" + name) 'Downloads the html source and puts it in the variable src
Dim tmp() As String = src.Split(",")
tmp = src.Split(",")
If (tmp(1) > 900) Then
Label2.Text = tmp(1)
ElseIf src.IndexOf("Error 404") > -1 Then
Label2.Text = "Error"
Else
Label2.Text = "Total level is below 900"
End If
End Sub
Any help would be appreciated. Thanks


