BUENO AQUI EL CODIGO:
---------------------------VB----------------------------
Option Explicit
Dim bb, a As Integer
Dim URL
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.megavideo.com/?s=signup"
End Sub
Private Sub Timer1_Timer()
bb = Val(bb) + 1
If Val(bb) = Val(20) Then
If InStr(URL, "http://www.megavideo.com/?s=signup") > 0 Then
'
' Here when the next page arrives and you need to enter something in the textbox
' and then click on the Send button = 5.php.html
'
' <input name="message" title="Message:" value="" maxlength="255" type="text">
' <input name="Send" value="Send" type="submit">
'
WebBrowser1.document.All("message").Value = "HELLO"
WebBrowser1.document.All("signupform").Click
Exit Sub
End If
Else
Label1.Caption = bb
End If
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim HTML As HTMLDocument
Dim HTMLI As HTMLInputElement
Set HTML = WebBrowser1.document
If URL = "http://www.megavideo.com/?s=signup" Then
'
' Here when you first visit the site and the user name and login fields
' need to be submitted
'
WebBrowser1.document.All("email").Value = "ARNOLD"
WebBrowser1.document.All("password").Value = "123456789"
'
' <input type="submit" value="Login"/>
'
For Each HTMLI In HTML.getElementsByTagName("input")
If HTMLI.Value = "Login" Then
HTMLI.Click
Exit Sub
End If
Next
End If
If InStr(URL, "http://www.megavideo.com/?s=signup") > 0 Then
'
' Here when the next page arrives and you need to select the "Enter" link = 1.php.html
'
' <a href="http://pinoywap.net/v2/index.php?action=main&type=send&susi=2762b42dad6b3349b3c0bfac9d157244&popm=1">[ enter ]</a>
'
For Each HTMLI In HTML.getElementsByTagName("A")
If HTMLI.innerHTML = "[ enter ]" Then
HTMLI.Click
Exit Sub
End If
Next
End If
If InStr(URL, "http://www.megavideo.com/?s=signup") > 0 Then
'
' Here when the next page arrives and you need to select chatrooms
'
' <a accesskey="4" href="http://pinoywap.net/v2/index.php?action=chat&susi=2762b42dad6b3349b3c0bfac9d157244&type=send">Chatrooms(69)</a>
'
For Each HTMLI In HTML.getElementsByTagName("A")
If InStr(HTMLI.innerHTML, "Chatrooms") > 0 Then
HTMLI.Click
Exit Sub
End If
Next
End If
If InStr(URL, "http://www.megavideo.com/?s=signup") > 0 Then
'
' Here when the next page arrives and you need to select adults 18+ = 2.php.html
'
' <a href="http://pinoywap.net/v2/chatw5c.php?susi=2762b42dad6b3349b3c0bfac9d157244&rid=6857&type=send">+ adults 18+ (1)</a>
'
For Each HTMLI In HTML.getElementsByTagName("A")
If InStr(HTMLI.innerHTML, "adults 18+") > 0 Then
HTMLI.Click
Exit Sub
End If
Next
End If
If InStr(URL, "http://www.megavideo.com/?s=signup") > 0 Then
bb = 0
Timer1.Enabled = True
'
' Here when the next page arrives and you need to select write = 4.php.html
'
' <a href="http://pinoywap.net/v2/chatw5c.php?action=say&susi=2762b42dad6b3349b3c0bfac9d157244&rid=6857&rpw=&type=send">write</a>
'
For Each HTMLI In HTML.getElementsByTagName("A")
If HTMLI.innerHTML = "write" Then
HTMLI.Click
Exit Sub
End If
Next
End If
End Sub
---------------------------HTML--------------------------------------
<form method="post" name="loginForm" id="loginform">
<input type="hidden" name="action" value="login" />
<input type="hidden" name="cnext" value="">
<input type="hidden" name="snext" value="">
<input type="hidden" name="touser" value="">
<input type="hidden" name="user" value="">
<TR>
<TD style="width:130px; text-align:right; padding-right:5px; padding-top:5px;" valign="top" height="35">Nom d'utilisateur:</TD>
<TD valign="top"><input type="text" size="25" maxlength="60" name="nickname" style="width:250px; border:solid 1px; border-color:#BEBBB5; height:22px;"/></TD>
</TR>
<TR>
<TD valign="top" style="width:130px; text-align:right; padding-right:5px; padding-top:5px;" height="35">Mot de passe:</TD>
<TD valign="top"><input type="password" size="20" maxlength="20" name="password" style="width:250px; border:solid 1px; border-color:#BEBBB5; height:22px;" /></TD>
</TR>
</TABLE>
<div style="position:relative; width:386px; text-align:center; height:26px;">
<div style="position:absolute; width:109px; height:26px; left:276px; top:0px; cursor:pointer;" onClick="javascript:document.getElementById('loginform').submit();" onmouseover="imgbutton.src=document.getElementById('imgbutton1').src; document.getElementById('imgbutton2').src=imgbuttono.src;" onmouseout="document.getElementById('imgbutton2').src=imgbutton.src;"><div style="position:absolute; left:0px; top:0px; width:109px; height:26px;"><IMG SRC="http://wwwstatic.megavideo.com/mvgui/button.gif" WIDTH="109" HEIGHT="26" BORDER="0" ALT="" id="imgbutton2"></div><div style="position:absolute; left:0px; top:3px; width:109px; text-align:center; font-family:arial; font-size:12px; color:#FFFFFF; font-weight:bold; text-decoration:none;">Connexion</div></div>
</div>
FUNCIONA cORRECTAMENTE HASTA UNA CIERTA PARTE ME DI CUENTA Q NO PUEDE escribir EL NICKNAME POR Q HAYA 2 CAMPOS REPETIDOS EN EL REGISTRO EXIXTE UN CAMPO Q TINE EL VALOR DE nicname
Y TAMBIEN EN EL CAMBO DE LOGIN EXIXTE ESE MISMO CAMPO ASIES EL ERROR ESTA AHI LO DEMAS FUNCIONA CORECTAMSENTE COMO PODRIA AHCER escribir EL CAMPO DE NICK NAME SI ESTAN TEPETIDOS ( name="nickname") ES LO SE REPITE TANTO EN NUEVO REGISTRO Y EN EL MOMENTO DE INGRESAR
OTRO ERROR Q TENGO ESQ NO PUEDO DARLE UN CLIK EN EL BOTON DE cODIGO YA Q TIENE UNA SENTENCIA EN JS
<div style="position:absolute; width:109px; height:26px; left:276px; top:0px; cursor:pointer;" onClick="javascript:document.getElementById('loginform').submit();" onmouseover="imgbutton.src=document.getElementById('imgbutton1').src; document.getElementById('imgbutton2').src=imgbuttono.src;" onmouseout="document.getElementById('imgbutton2').src=imgbutton.src;"><div style="position:absolute; left:0px; top:0px; width:109px; height:26px;"><IMG SRC="http://wwwstatic.megavideo.com/mvgui/button.gif" WIDTH="109" HEIGHT="26" BORDER="0" ALT="" id="imgbutton2"></div><div style="position:absolute; left:0px; top:3px; width:109px; text-align:center; font-family:arial; font-size:12px; color:#FFFFFF; font-weight:bold; text-decoration:none;">Connexion</div>
NO SE Q SENTENCIA deberia SER LA CORECTA ESPERO Q ME AYUDEN SI TIENE UNA MEJOR IDEA PARA AHCER ESTA MISMA ACCION AYUDENME
PAGO POR CULAQUIER NUEVA IDE O AYUDA EN ESTO DE MEGAVIDEO GRACIAS ESPERO Q PUEDAN LEE MIS POS LOS MAS CAPOS