简体   繁体   中英

loop with python or ahk with LMB

have a nice day, could someone help me? I would like to make a program but I don't know how. .ahk if possible or python ..in ahk i did this

LAlt::
loop
{
   click, down
   break
}
return

this does, when you press alt and release it, this holds down LMB until you click with LMB. My question is, how do I do it only with LMB. It would be necessary to add a key for PAUSE. I don't understand much about programming, I did it with tutorials. Thanks for your time

So, I don't know if I understand well what you want, but i think you need something like this?

LButton::
If (var = "Pressed")
{
    Click, Left, , Up
    var := "Unpressed"
}
Else
{
    Click, Left, , Down
    var := "Pressed"
}
Return

As a tip to begins with ahk, you can use 'https://www.macrocreator.com/', in this program you can make a script very easily and you can see what it writes in ahk.

Like this: 在此处输入图像描述

You can export an AHK file, or just copy the script in the right side of the screen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM