HansHenrik Posted February 18, 2009 Posted February 18, 2009 im using "While _IsPressed" and seemingly, "while" gets terminated second after i *press it down*, and wont activate again until i release the button and press it again anyway heres the code #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 While _IsPressed("01", $dll); while Left mouse button is pressed send("{CTRLDOWN}{CTRLUP}") Wend sleep(1); need for speed - i can cope with the cpu needs :p Wend i want it to: when left mouse button is down/pressed, keep spamming ctrldown/ctrlup (maybe i can use HotKeySet + a function too, or something... but couldn't get HotKeySet on mouse buttons) any ideas?
Manjish Posted February 18, 2009 Posted February 18, 2009 (edited) hans.. Ur script does what u it want it to do.. Maybe you are not able to realize that it does.. as u pressing the ctrl key is not a visible result.. I replaced send("{CTRLDOWN}{CTRLUP}") with send("k") and the moment i press my left mouse button.. it sends ks all over my scite.. then moment i stop pressing.. k stops too.. Its working.. my friend.. try it out.. Edited February 18, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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