foodforhire Posted July 5, 2009 Posted July 5, 2009 I'm trying to create a simple script that basically makes it so that when you right click it pushes the number 3. I want to use caps lock for toggling it but I'm not sure how to do the rest. Also, I'm trying to make another script where, by holding down left click, it rapidly clicks left click. The best I've been able to do though is left click to toggle it on and off. Any help?
CodyBarrett Posted July 5, 2009 Posted July 5, 2009 While If _IsPressed ('02') Then Send ('3') Wend not tested but the theory is what you need not to copy the code [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size]
darkmaster071 Posted July 5, 2009 Posted July 5, 2009 (edited) What about creating a hotkey for those buttons you would like to control? A hotkey for left mouse button would be so when you hold it it would loop Mouseclick left. Hotkey for capslock would be so when you toggle it the script is paused. And for rightclick simply Send 3. Hope it helps. Edited July 5, 2009 by darkmaster071
foodforhire Posted July 5, 2009 Author Posted July 5, 2009 While If _IsPressed ('02') Then Send ('3') Wend not tested but the theory is what you need not to copy the codeSo right now I have... HotKeySet("CAPSLOCK", "RC3") HotKeySet("+{ESC}", "EndRC3") ;FUNCTIONS Func RC3() While If _IsPressed ('02') Then Send ('3') Wend EndFunc ;==>RC3 Func EndRC3() Exit EndFunc ;==>EndRC3 but that's not working, any ideas?
Developers Jos Posted July 5, 2009 Developers Posted July 5, 2009 So right now I have... HotKeySet("CAPSLOCK", "RC3") HotKeySet("+{ESC}", "EndRC3") ;FUNCTIONS Func RC3() While If _IsPressed ('02') Then Send ('3') Wend EndFunc ;==>RC3 Func EndRC3() Exit EndFunc ;==>EndRC3 but that's not working, any ideas?Assume it ends pretty quickly as there is no code to run other than the 2 first lines. 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.
TheOnlyOne Posted July 5, 2009 Posted July 5, 2009 (edited) HotKeySet("CAPSLOCK", "RC3") HotKeySet("+{ESC}", "EndRC3") while 1 sleep (10) wend ;FUNCTIONS Func RC3() While If _IsPressed ('02') Then Send ('3') Wend EndFunc ;==>RC3 Func EndRC3() Exit EndFunc ;==>EndRC3 Edited July 5, 2009 by TheOnlyOne
darkmaster071 Posted July 5, 2009 Posted July 5, 2009 #include <Misc.au3> Global $var HotKeySet("{CAPSLOCK}", "RC3") HotKeySet("{ESC}", "EndRC3") While 1 WEnd ;FUNCTIONS Func RC3() $var = NOT $var While $var If _IsPressed ('02') Then Send ('3') WEnd EndFunc;==>RC3 Func EndRC3() Exit 0 EndFunc;==>EndRC3 Works kinda akward.
Developers Jos Posted July 5, 2009 Developers Posted July 5, 2009 Works kinda akward...and will take a lot of CPU cycles to run. 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.
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