AUTO CLICL

SABIDAOXD 28/03/2011 14:13:56
#369472
ae gente para eu terminar meu bot só falta uma função para fazer com que o vb fassa autoclick alguem sabe como é?
ADHEL 28/03/2011 14:18:14
#369474
Veja se é isso

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox([Ô]SHOW[Ô])
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button2.PerformClick()
End Sub
SABIDAOXD 28/03/2011 14:34:35
#369479
Eu quero tipo que a casa 15 segundo o mouse da um clique
PEGUDO 28/03/2011 14:35:52
#369480
Resposta escolhida
Fiz este aqui no meu projeto:

COLOQUE ESTE CÓDIGO EM UM MÓDULO:
[txt-color=#0000f0]Declare Sub[/txt-color] mouse_event [txt-color=#0000f0]Lib[/txt-color] [txt-color=#e80000][Ô]user32[Ô][/txt-color] [txt-color=#0000f0]Alias[/txt-color] [txt-color=#e80000][Ô]mouse_event[Ô][/txt-color] ([txt-color=#0000f0]ByVal[/txt-color] dwFlags [txt-color=#0000f0]As Integer[/txt-color], [txt-color=#0000f0]ByVal[/txt-color] dx [txt-color=#0000f0]As Integer[/txt-color], [txt-color=#0000f0]ByVal[/txt-color] dy [txt-color=#0000f0]As Integer[/txt-color], [txt-color=#0000f0]ByVal[/txt-color] cButtons [txt-color=#0000f0]As Integer[/txt-color], [txt-color=#0000f0]ByVal[/txt-color] dwExtraInfo [txt-color=#0000f0]As Integer[/txt-color])
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_ABSOLUTE = &H8000 [txt-color=#007100][ô] absolute move[/txt-color]
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_LEFTDOWN = &H2[txt-color=#007100] [ô] left button down[/txt-color]
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_LEFTUP = &H4 [txt-color=#007100][ô] left button up[/txt-color]
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_MOVE = &H1 [txt-color=#007100][ô] mouse move[/txt-color]
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_MIDDLEDOWN = &H20
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_MIDDLEUP = &H40
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_RIGHTDOWN = &H8
[txt-color=#0000f0]Private Const[/txt-color] MOUSEEVENTF_RIGHTUP = &H10

[txt-color=#0000f0]Public Sub[/txt-color] Clique()
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 1)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 1)
[txt-color=#0000f0]End Sub[/txt-color]

NO CÓDIGO DO FORM UTILIZE:
Clique() [txt-color=#007100][ô]Esta chamada vai executar os eventos de clicar o mouse com o botão esquerdo[/txt-color]

PARA FAZER O PROGRAMA ESPERAR:
[txt-color=#0000f0]Private Sub[/txt-color] Esperar([txt-color=#0000f0]ByVal[/txt-color] Segundos [txt-color=#0000f0]As Integer[/txt-color])
[txt-color=#0000f0]Dim[/txt-color] Final [txt-color=#0000f0]As Date[/txt-color] = TimeOfDay.AddSeconds(Segundos)

[txt-color=#0000f0]Whille Not[/txt-color] TimeOfDay.Second = Final.Second
Application.DoEvents
[txt-color=#0000f0]End While
End Sub[/txt-color]

USE ASSIM:
Esperar(15)
SABIDAOXD 28/03/2011 14:44:07
#369483
obrigado a voces 2 e a vc pegudo ja responder 3 perguntas minhas vou tentar fazer aqui caso eu tenho dúvidas eu voltarei
Tópico encerrado , respostas não são mais permitidas