CCJ
Messages postés
565
Date d'inscription
mercredi 19 mai 2004
Statut
Membre
Dernière intervention
30 avril 2008
1
18 août 2004 à 21:48
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Check1_Click()
Check2.Value = Unchecked
txtRepetition.Enabled = True
End Sub
Private Sub Check2_Click()
Check1.Value = Unchecked
txtRepetition.Enabled = False
End Sub
Private Sub cmdArreter_Click()
repetition = txtRepetition + 5
End Sub
Private Sub cmdCommencer_Click()
On Error GoTo erreur
Dim text1 As String
Dim text2 As String
Dim text3 As String
Dim text4 As String
Dim text5 As String
Dim text6 As String
text1 = txtTouche1.Count
text2 = txtTouche2.Count
text3 = txtTouche3.Count
text4 = txtTouche4.Count
text5 = txtTouche5.Count
text6 = txtTouche6.Count
If Check2.Value = Checked Then
Sleep txtDelai.Text
keybd_event text1, 0, 0, 0
keybd_event text1, 0, 2, 0
keybd_event text2, 0, 0, 0
keybd_event text2, 0, 2, 0
keybd_event text3, 0, 0, 0
keybd_event text3, 0, 2, 0
keybd_event text4, 0, 0, 0
keybd_event text4, 0, 2, 0
keybd_event text5, 0, 0, 0
keybd_event text5, 0, 2, 0
keybd_event text6, 0, 0, 0
keybd_event text6, 0, 2, 0
If Option1.Value = True Then
keybd_event 13, 0, 0, 0
keybd_event 13, 0, 2, 0
Else
End If
Else
Dim repetition As String
repetition = "0"
Do While repetition < txtRepetition.Text
repetition = repetition + 1
Sleep txtDelai.Text
keybd_event txtTouche1.Text, 0, 0, 0
keybd_event txtTouche1.Text, 0, 2, 0
keybd_event txtTouche2.Text, 0, 0, 0
keybd_event txtTouche2.Text, 0, 2, 0
keybd_event txtTouche3.Text, 0, 0, 0
keybd_event txtTouche3.Text, 0, 2, 0
keybd_event txtTouche4.Text, 0, 0, 0
keybd_event txtTouche4.Text, 0, 2, 0
keybd_event txtTouche5.Text, 0, 0, 0
keybd_event txtTouche5.Text, 0, 2, 0
keybd_event txtTouche6.Text, 0, 0, 0
keybd_event txtTouche6.Text, 0, 2, 0
If Option1.Value = True Then
keybd_event 13, 0, 0, 0
keybd_event 13, 0, 2, 0
Else
End If
End If
End Sub
Private Sub Form_Load()
MsgBox "Attention,les carractere que vous entrerez dans les textes Touche 1 a 6 ne seront pas pris en compte pour des raison de complexité de code seul leurs nombre(quantité)seront utile(correspondant aux code ascii des touches voulu)exemple pour ! : 11111111111111111111111111111111", vbInformation, "Attention"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmMenu.Show
End Sub
Private Sub txtTouche1_Change(Index As Integer)
lblTouche1.Caption = lblTouche1.Caption & txtTouche1.Count
End Sub
Private Sub txtTouche2_Change(Index As Integer)
lblTouche2.Caption = lblTouche2.Caption & txtTouche2.Count
End Sub
Private Sub txtTouche3_Change(Index As Integer)
lblTouche3.Caption = lblTouche3.Caption & txtTouche3.Count
End Sub
Private Sub txtTouche4_Change(Index As Integer)
lblTouche4.Caption = lblTouche4.Caption & txtTouche4.Count
End Sub
Private Sub txtTouche5_Change(Index As Integer)
lblTouche5.Caption = lblTouche5.Caption & txtTouche5.Count
End Sub
Private Sub txtTouche6_Change(Index As Integer)
lblTouche6.Caption = lblTouche6.Caption & txtTouche6.Count
End Sub
VirusMan :-p