
Copiar y pegar automaticamente
Publicado por Bakiet (2 intervenciones) el 22/09/2008 03:11:11
hola como estan a ver si alguien me puede ayudar , estoy automatizando la carga de informacion hacia una pagina web , esta misma tiene un formulario que recorre cada textbox hace una copia luego tabula automaticamente a otro formulario que contiene un webbrowser dentro de el tabulo hasta llegar el punto donde deseo pegar el texto copiado anteriormente , el codigo me funciona pero solo si no tabulo tantas veces al parecer ya que al tabular mas de 10 veces no pega el texto aunque el Clipboard de windows todavia tiene el texto grabado este es el codigo a ver si una sugerencia
txtImei.SelLength = Len(txtImei.Text)
On Local Error Resume Next
Clipboard.SetText Form4.txtImei.SelText
SendKeys ("%{Tab}") ' en este punto tabulo al formulario donde se encuentra el webbrowser
SendKeys ("{Tab}") ' genero las tabulaciones para llegar a un punto en expecifico
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
' genero el pegar en el formulario donde me encuentro
frmPrincipal.Wbr.ExecWB OLECMDID_PASTE, OLECMDEXECOPT_DODEFAULT 'Edición -> Pegar (Ctrl+V)
Clipboard.Clear
una ayuda gracias......
txtImei.SelLength = Len(txtImei.Text)
On Local Error Resume Next
Clipboard.SetText Form4.txtImei.SelText
SendKeys ("%{Tab}") ' en este punto tabulo al formulario donde se encuentra el webbrowser
SendKeys ("{Tab}") ' genero las tabulaciones para llegar a un punto en expecifico
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
SendKeys ("{Tab}")
' genero el pegar en el formulario donde me encuentro
frmPrincipal.Wbr.ExecWB OLECMDID_PASTE, OLECMDEXECOPT_DODEFAULT 'Edición -> Pegar (Ctrl+V)
Clipboard.Clear
una ayuda gracias......
Valora esta pregunta


0