autohotkey - Solution to AHK sending too many events when holding down a mouse button? -


when using 3 different methods of holding down left mouse button:

mouseclick, left, 0, 0, 1, , d, r 

or

send {lbutton down} 

or

click down 

the game i'm making macro logs me out complaining i'm sending many actions. tested script, like:

f3::     click down     return 

so there's no chance other code causing it.

i wondering if there settings can use (by settings mean coordmode, mouse, screen) or other solution perhaps prevent whatever rapid event sending ahk using simulate mouse button being held down. there possible fix can try? i'm open testing ideas.

well, introduce sleep so:

lbutton:: while (getkeystate("lbutton", "p")) {     mouseclick, left     sleep, 100 } return 

though dislike binding mouse click behaviours via same mouse click, can lead results difficult out of.

here's example toggleable hotkey.

insert:: sendinput, {lbutton down} loop {     sleep, 100     if getkeystate("insert", "p") ; hold second sleep delay recognition.     {         sendinput, {lbutton up}                     break     } } return 

edited per comments:

insert:: sendinput, {lbutton down} keywait, insert, d sendinput, {lbutton up} return 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -