Hatrick Posted December 1, 2007 Share Posted December 1, 2007 (edited) Ok this is my sad attempt for a simple right mouse click down event: It should click left mouse button over and over every 100milliseconds, but it doesnt. HotKeySet("{MouseDown ( "Right" )}", "Click") HotKeySet("{ESC)}", "Terminate") while 1 sleep(100) WEnd Func Click() send("{MouseClick ( "left" )}") sleep(100) EndFunc Func Terminate() Exit 0 EndFune It gives of an error: HotKeySet(" {MouseDown( "Right" )}","Click") HotKeySet(" {MouseDown( "Right^ERROR please help Edited December 1, 2007 by Hatrick Link to comment Share on other sites More sharing options...
Generator Posted December 1, 2007 Share Posted December 1, 2007 You cannot set MouseClick as Hotkey. Look up _IsPressed() in the Misc.au3 includes. Also to send a mouse click you do not need send func to wrap it. Link to comment Share on other sites More sharing options...
Hatrick Posted December 1, 2007 Author Share Posted December 1, 2007 (edited) ok im lost now.. Could you help please #include <Misc.au3> HotKeySet("{ESC)}", "Terminate") While 1 If _IsPressed(02) then Do //What Goes Here to click left mouse button? Until Not _IsPressed(02) sleep(100) EndIf WEnd Func Terminate() Exit 0 EndFunc Edited December 1, 2007 by Hatrick Link to comment Share on other sites More sharing options...
Generator Posted December 1, 2007 Share Posted December 1, 2007 #include <Misc.au3> HotKeySet("{ESC)}", "Terminate") While 1 If _IsPressed("02") then Do Sleep(1) Until Not _IsPressed("02") MouseClick("left") Sleep(100) EndIf WEnd Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
Hatrick Posted December 1, 2007 Author Share Posted December 1, 2007 (edited) thanks mate. If i hold right click down it will keep left click as well, or will it break rightc lick. (if so can i change it to hold R down to left click) e.g. #include <Misc.au3> HotKeySet("{ESC)}", "Terminate") While 1 If _IsPressed("52") then Do Sleep(1) Until Not _IsPressed("52") MouseClick("left") Sleep(100) MouseClick("left") Sleep(100) MouseClick("left") Sleep(100) MouseClick("left") Sleep(100) EndIf WEnd Func Terminate() Exit 0 EndFunc Edited December 1, 2007 by Hatrick Link to comment Share on other sites More sharing options...
Generator Posted December 1, 2007 Share Posted December 1, 2007 (edited) thanks mate. If i hold right click down it will keep left click as well, or will it break rightc lick. (if so can i change it to hold R down to left click)The above script Executes LeftClicks after you released RightClick. Not sure what you want, but just play around with the code and test it base on your needs. Edited December 1, 2007 by Generator Link to comment Share on other sites More sharing options...
Hatrick Posted December 1, 2007 Author Share Posted December 1, 2007 Thanks again Generator 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