Quote:
Originally Posted by second2none Just do a Loop or something.
Private Sub Command1_Click()
Dim OnOff As Boolean
'Make On true and False Off
OnOff = True
Do While OnOff = True
strHTML = wrapper.GetWrapper("URL")
If InStr(1, strHTML, "FOUND POKEMON") Then
CATCHING CODE
ElseIf InStr(1, strHTML, "No More PokeBalls") Then
OnOff = False
End If
Loop
End Sub |
Thanks :] I don't get the OnOff bit though, what does that do?
Nvm I get it, lemme try this.
I tried:
Code:
Private Sub cmdLogin_Click()
Dim strHTML As String, OnOff As Boolean
strHTML = Wrapper.PostWrapper("http://srpg.myircshells.com/login.php", "user=" & txtUser.Text & "&pass=" & txtPass.Text)
If InStr(1, strHTML, "failed") Then
lblStatus.Caption = "Bad password."
ElseIf InStr(1, strHTML, "logged") Then
lblStatus.Caption = "Logged In."
Else
lblStatus.Caption = "Unknown Error."
End If
If lblStatus.Caption = "Logged In." Then
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/index.php", "http://srpg.myircshells.com/login.php")
End If
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php?action=explore", "http://srpg.myircshells.com/index.php")
OnOff = True
Do While OnOff = True
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php?action=explore")
If InStr(1, strHTML, "You found a") Then
strHTML = Wrapper.GetWrapper("http://srpg.myircshells.com/promo.php?action=catch")
ElseIf InStr(1, strHTML, "You did not find") Then
OnOff = True
End If
Loop
End Sub and it gets stuck at 'Logged in'. I even tried doing a lblStatus.Text = "Nothing found" or "Pokemon Caught!" to check if it got that far but the label never changed from logged in.
Also, when I x'd out of the 'Run' trial thingy, I got some error about Client Site not available or something, and when I hit debug it takes me to a part of the wrapper's code about 'time'. :/