Darko_green_LOrd Posted August 28, 2019 Share Posted August 28, 2019 Hello , im etryyng to create a Autoclicker when i hold right / left button it will be clicking Left click it will click once and pause the Do Right click isnt even working Code : #include <Misc.au3> ;Variables Global $LeftClickHold = False Global $RightClickHold = False Global $LclickCount = 0 Global $RclickCount = 0 Local $hDLL = DllOpen("user32.dll") Global $Num = 0 Global $MaxNum = 1000 Do If _IsPressed(01, $HDLL) Then $LeftClickHold = True $LclickCount += 1 ToolTip($LclickCount) Send("LC") Else $LeftClickHold = False $LclickCount = 0 EndIf Sleep(10) Until $Num >= $MaxNum Do If _IsPressed(02, $HDLL) Then $RightClickHold = True $RclickCount += 1 ToolTip($RclickCount) Send("RC") Else $RightClickHold = False $RclickCount = 0 EndIf Sleep(10) Until $Num >= $MaxNum Link to comment Share on other sites More sharing options...
Darko_green_LOrd Posted August 28, 2019 Author Share Posted August 28, 2019 Sorry for unoranized post , this is the file AutoClick.au3 Link to comment Share on other sites More sharing options...
Darko_green_LOrd Posted August 28, 2019 Author Share Posted August 28, 2019 #include <Misc.au3> ;Variables Global $LeftClickHold = False Global $RightClickHold = False Global $LclickCount = 0 Global $RclickCount = 0 Local $hDLL = DllOpen("user32.dll") Global $Num = 0 Global $MaxNum = 1000 Do If _IsPressed(01, $HDLL) Then $LeftClickHold = True $LclickCount += 1 ToolTip($LclickCount) Send("LC") Else $LeftClickHold = False $LclickCount = 0 EndIf Sleep(10) Until $Num >= $MaxNum Do If _IsPressed(02, $HDLL) Then $RightClickHold = True $RclickCount += 1 ToolTip($RclickCount) Send("RC") Else $RightClickHold = False $RclickCount = 0 EndIf Sleep(10) Until $Num >= $MaxNum Link to comment Share on other sites More sharing options...
Developers Jos Posted August 28, 2019 Developers Share Posted August 28, 2019 You have 2 loops in there of which the second will never be performed. Having said that, I can only assume this is for game automation so would urge you to read our forum rules now first before continuing posting in these forums. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Darko_green_LOrd Posted August 28, 2019 Author Share Posted August 28, 2019 I have red the rules , its not for game automation its for website where is over 800 pages i want to go to middle of it quickly so i decided to create auto clicker this is the site https://www.steamcardexchange.net/index.php?badgeprices Link to comment Share on other sites More sharing options...
Zedna Posted August 28, 2019 Share Posted August 28, 2019 (edited) #include <Misc.au3> Global $LeftClickHold = False Global $RightClickHold = False Local $hDLL = DllOpen("user32.dll") Global $MaxNum = 1000 While 1 If _IsPressed(01, $HDLL) Then $LeftClickHold = True $LclickCount = 0 While _IsPressed(01, $HDLL) And $LclickCount < $MaxNum $LclickCount += 1 ToolTip($LclickCount) Send("LC") Sleep(10) WEnd $LeftClickHold = False EndIf If _IsPressed(02, $HDLL) Then $RightClickHold = True $RclickCount = 0 While _IsPressed(02, $HDLL) And $RclickCount < $MaxNum $RclickCount += 1 ToolTip($RclickCount) Send("RC") Sleep(10) WEnd $RightClickHold = False EndIf Sleep(10) WEnd Edited August 28, 2019 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Darko_green_LOrd Posted August 28, 2019 Author Share Posted August 28, 2019 Thanks Alot man Link to comment Share on other sites More sharing options...
Darko_green_LOrd Posted August 28, 2019 Author Share Posted August 28, 2019 The Send(LC) and Send(RC) was just for debugging it when i will try to add MouseClick("left") and MoueClick("right") instead of the Sends like its working but have same problem with the original script it will just pause at 1 and it wont click while im holding mouseclick, the limit was to do the repeat bc i didnt knew any way to make it loop #include <Misc.au3> Global $LeftClickHold = False Global $RightClickHold = False Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed(01, $HDLL) Then $LeftClickHold = True $LclickCount = 0 While _IsPressed(01, $HDLL) $LclickCount += 1 ToolTip($LclickCount) MouseClick("left") Sleep(10) WEnd $LeftClickHold = False EndIf If _IsPressed(02, $HDLL) Then $RightClickHold = True $RclickCount = 0 While _IsPressed(02, $HDLL) $RclickCount += 1 ToolTip($RclickCount) MouseClick("right") Sleep(10) WEnd $RightClickHold = False EndIf Sleep(10) WEnd Link to comment Share on other sites More sharing options...
Zedna Posted August 29, 2019 Share Posted August 29, 2019 Programatically invoked Send() or MouseClick() probably changes result of _IsPressed() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Darko_green_LOrd Posted August 29, 2019 Author Share Posted August 29, 2019 Send() is working fine , just MouseClick() i tried also MouseDown() MouseUP() or MouseClick("primary") but i dint find yet a way to make it work Link to comment Share on other sites More sharing options...
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