View Single Post
(#1)
Old
DefectiveProduct is Offline
The Best
DefectiveProduct is on a distinguished road
 
Posts: 771
Join Date: Jul 2006
Location: O_o
Default TVB & EAB Finder (Visual Basic 6) - 08-04-2006, 01:13 PM

I figure I'd post the method to get the TVB and EAB from YAWCC here.

Requirements:
1 Web Browser named WebBrowser1 (This is the browser that Coke will be framed in)
1 TextBox named TxtEAB
1 TextBox named TxtTVB
1 TextBox named TxtHiddenUrl (And be sure to set this textboxes Visible property to FALSE.)


Put this code in your form.

Code:
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
TxtHiddenUrl.Text = "" & WebBrowser1.LocationURL & "$$$"
End Sub
And than this one.

Code:
Private Sub TxtHiddenUrl_Change()
On Error Resume Next
If InStr(TxtHiddenUrl.Text, "SF_Client.jsp") Then
strCode = Split(Split(TxtHiddenUrl.Text, "eab=")(1), "&tvb")(0)
SPLITRESULT = strCode
TxtEAB.Text = SPLITRESULT
strCode2 = Split(Split(TxtHiddenUrl.Text, "&tvb=")(1), "$$$")(0)
SPLITRESULT2 = strCode2
TxtTVB.Text = SPLITRESULT2
End If
End Sub
Oh, and by the way. Make sure that the URL you use to go to Coke Studios in your browser is http://www.mycoke.com/showCokeStudiosLandingPage.do

I modified this code a bit from the one I used in YAWCC so I can't be 100% positive that it works.

I think this is all very self exlanitory. Post any questions you have.






Reply With Quote