Hello i did program which click right or left button on mouse - x-times - you write number of clicks into a white space..
i dont know why it has got problem with ->
If $nMsg = $right2 Then
If ^ ERROR
there is the code..
#include <GUIConstants.au3>
HotKeySet("{F11}", "exit2")
GUICreate("Clicker", 210, 80)
GUISetBkColor(0xF52412)
$Label = GUICtrlCreateLabel("Write a number of clicks->click on a button", 5, 10)
$left2 = GUICtrlCreateButton("Left", 10, 50, 50, 20)
$right2 = GUICtrlCreateButton("Right", 80, 50, 50, 20)
$space2 = GUICtrlCreateInput("", 82, 25, 45, 21)
$exit = GUICtrlCreateButton("Exit", 150, 50, 50, 20)
GUISetState() ; display the GUI
$inp = 50
While 1
If $nMsg = $right2 Then
$i = 0
$inp = GUICtrlRead($space2)
If $inp >= 1 Then
Do
Sleep(300)
MouseClick("right")
$i = $i + 1
Until $i = $inp
MsgBox(0, "Clicker", " Complete")
EndIf
EndIf
If $nMsg = $left2 Then
$i = 0
$inp = GUICtrlRead($space2)
If $inp >= 1 Then
Do
Sleep(300)
MouseClick("left")
$i = $i + 1
Until $i = $inp
MsgBox(0, "Clicker", "Complete")
EndIf
EndIf
WEnd
Func exit2 ()
Exit
EndFunc
Can you help me?