Letis Posted December 11, 2008 Posted December 11, 2008 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.. expandcollapse popup#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?
martin Posted December 11, 2008 Posted December 11, 2008 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.. expandcollapse popup#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?You haven't set $nMsg to anything so it won't work. Add $nMsg = GuiGetMsg() after the while 1line and before If $nMsg = $right2 Then Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
someone Posted December 11, 2008 Posted December 11, 2008 You forgot to define what $nMsg is in your loop. Add $nMsg = GUIGetMsg() right below your While 1 line. While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd
Letis Posted December 11, 2008 Author Posted December 11, 2008 thx men:) i am noob in auto it:D i am learning it now...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now