Jump to content
Sign in to follow this  

While + IsPressed problem

Recommended Posts


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
sleep(1); need for speed - i can cope with the cpu needs :p

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?

Share this post

Link to post
Share on other sites


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}")



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 by Manjish

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.