Advertisement
GroggyOtter

Untitled

Mar 20th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. VERSION 5.00
  2. Begin VB.Form Autoclicker
  3. Caption = "Auto Clicker"
  4. ClientHeight = 1815
  5. ClientLeft = 60
  6. ClientTop = 345
  7. ClientWidth = 3690
  8. LinkTopic = "Form1"
  9. ScaleHeight = 1815
  10. ScaleWidth = 3690
  11. StartUpPosition = 3 'Windows Default
  12. Begin VB.TextBox Text2
  13. Height = 285
  14. Left = 2640
  15. TabIndex = 10
  16. Top = 600
  17. Visible = 0 'False
  18. Width = 495
  19. End
  20. Begin VB.TextBox Text1
  21. Height = 285
  22. Left = 1920
  23. TabIndex = 9
  24. Top = 600
  25. Visible = 0 'False
  26. Width = 615
  27. End
  28. Begin VB.Timer Timer3
  29. Interval = 1
  30. Left = 3480
  31. Top = 120
  32. End
  33. Begin VB.CommandButton Command3
  34. Caption = "Stop F2 or F7"
  35. Height = 375
  36. Left = 1920
  37. TabIndex = 5
  38. Top = 120
  39. Width = 1695
  40. End
  41. Begin VB.CommandButton Command2
  42. Caption = "Start F1 or F6"
  43. Height = 375
  44. Left = 120
  45. TabIndex = 4
  46. Top = 120
  47. Width = 1695
  48. End
  49. Begin VB.TextBox Text4
  50. Height = 285
  51. Left = 1920
  52. TabIndex = 2
  53. Text = "0"
  54. Top = 1440
  55. Width = 615
  56. End
  57. Begin VB.TextBox Text3
  58. Height = 285
  59. Left = 360
  60. TabIndex = 0
  61. Text = "0"
  62. Top = 1440
  63. Width = 615
  64. End
  65. Begin VB.Timer Timer2
  66. Enabled = 0 'False
  67. Interval = 5000
  68. Left = 3480
  69. Top = 480
  70. End
  71. Begin VB.Timer Timer1
  72. Interval = 1
  73. Left = 3480
  74. Top = 840
  75. End
  76. Begin VB.Label Label7
  77. Caption = "Usage"
  78. Height = 255
  79. Left = 360
  80. TabIndex = 8
  81. Top = 600
  82. Width = 1335
  83. End
  84. Begin VB.Label Label6
  85. Caption = "2. Hit start"
  86. Height = 255
  87. Left = 360
  88. TabIndex = 7
  89. Top = 1080
  90. Width = 2655
  91. End
  92. Begin VB.Label Label5
  93. Caption = "1. Set a speed"
  94. Height = 255
  95. Left = 360
  96. TabIndex = 6
  97. Top = 840
  98. Width = 2415
  99. End
  100. Begin VB.Label Label4
  101. Caption = "Milliseconds"
  102. Height = 255
  103. Left = 2640
  104. TabIndex = 3
  105. Top = 1440
  106. Width = 975
  107. End
  108. Begin VB.Label Label3
  109. Caption = "Seconds"
  110. Height = 255
  111. Left = 1080
  112. TabIndex = 1
  113. Top = 1440
  114. Width = 735
  115. End
  116. End
  117. Attribute VB_Name = "Autoclicker"
  118. Attribute VB_GlobalNameSpace = False
  119. Attribute VB_Creatable = False
  120. Attribute VB_PredeclaredId = True
  121. Attribute VB_Exposed = False
  122.  
  123. Private Sub Command1_Click()
  124. Text5 = Text5 - -1
  125. End Sub
  126.  
  127. Private Sub Command2_Click()
  128. Timer2.Enabled = True
  129. If Text3 = "" Then Text3 = "0"
  130. If Text4 = "" Then Text4 = "0"
  131. Timer2.Interval = (Text3 * 1000) - -(Text4)
  132. End Sub
  133.  
  134. Private Sub Command3_Click()
  135. Timer2.Enabled = False
  136. End Sub
  137.  
  138. Private Sub Timer1_Timer()
  139. Dim pos
  140. Dim pt As PointAPI
  141. pos = GetCursorPos(pt)
  142. Text1.Text = pt.X
  143. Text2.Text = pt.Y
  144. End Sub
  145.  
  146. Private Sub Timer2_Timer()
  147. Dim xP As Long
  148. Dim yP As Long
  149. xP = Text1.Text
  150. yP = Text2.Text
  151. MouseMove (xP), (yP)
  152. LeftClick (xP), (yP)
  153. End Sub
  154.  
  155. Private Sub Timer3_Timer()
  156. If GetAsyncKeyState(vbKeyF1) < 0 Or GetAsyncKeyState(vbKeyF6) < 0 Then
  157. Call Command2_Click
  158. End If
  159. If GetAsyncKeyState(vbKeyF2) Or GetAsyncKeyState(vbKeyF7) < 0 Then
  160. Call Command3_Click
  161. End If
  162. End Sub
  163.  
  164.  
  165. Attribute VB_Name = "Module1"
  166. Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  167. Declare Function ShellExecute Lib "shell32.dll" Alias _
  168. "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As _
  169. String, ByVal lpFile As String, ByVal lpParameters As String, _
  170. ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  171.  
  172. Public Const Author = "GXSLKGKSD"
  173.  
  174. Declare Function GetCursorPos& Lib "user32" (lpPoint As PointAPI)
  175. Type PointAPI
  176. X As Long
  177. Y As Long
  178. End Type
  179.  
  180. Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
  181. Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
  182. Public Const MOUSEEVENTF_LEFTDOWN = &H2
  183. Public Const MOUSEEVENTF_LEFTUP = &H4
  184.  
  185.  
  186. Sub MouseMove(xP As Long, yP As Long)
  187. Dim move
  188. move = SetCursorPos(xP, yP)
  189. End Sub
  190.  
  191.  
  192. Sub LeftClick(xP As Long, yP As Long)
  193. mouse_event MOUSEEVENTF_LEFTDOWN, xP, yP, 0, 0
  194. mouse_event MOUSEEVENTF_LEFTUP, xP, yP, 0, 0
  195. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement