1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
| Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
System.Threading.Thread.Sleep(2000)
Dim p As Point
System.Threading.Thread.Sleep(10000)
p.X = 966
p.Y = 154
Cursor.Position = p
System.Threading.Thread.Sleep(1000)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0) 'Enfonce le bouton de la souris
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) ' le relève
System.Threading.Thread.Sleep(3000)
Dim passe As Integer
passe = 1
debut:
If passe = 1 Then
p.X = 750
p.Y = 128
ElseIf passe = 2 Then
p.X = 970
p.Y = 128
ElseIf passe = 3 Then
p.X = 1180
p.Y = 128
ElseIf passe = 4 Then
p.X = 750
p.Y = 192
End If
Cursor.Position = p
System.Threading.Thread.Sleep(500)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0) 'Enfonce le bouton de la souris
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) ' le relève
System.Threading.Thread.Sleep(1000)
Dim bitmap As New Bitmap(My.Computer.Screen.WorkingArea.Height, My.Computer.Screen.WorkingArea.Width)
Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(bitmap)
g.CopyFromScreen(0, 0, 0, 0, New Size(bitmap.Height, bitmap.Width))
For i = 0 To bitmap.Height - 1
For i2 = 0 To bitmap.Width - 1
If bitmap.GetPixel(i2, i) = Color.FromArgb(255, 0, 0) Or bitmap.GetPixel(i2, i) = Color.FromArgb(254, 0, 0) Or bitmap.GetPixel(i2, i) = Color.FromArgb(253, 0, 0) Then
SetCursorPos(i2, i)
End If
Next
Next
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0) 'Enfonce le bouton de la souris
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) ' le relève
System.Threading.Thread.Sleep(3000)
'ferme la pub
p.X = 446
p.Y = 133
Cursor.Position = p
System.Threading.Thread.Sleep(1000)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0) 'Enfonce le bouton de la souris
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) ' le relève
System.Threading.Thread.Sleep(3000)
If passe = 4 Then
GoTo fin
End If
passe = passe + 1
System.Threading.Thread.Sleep(3000)
GoTo debut
fin:
End Sub |
Partager