如何在按下键时按住鼠标?

如何在按下键时按住鼠标?

问题描述:

我不熟悉自动热键功能,并且对我缺乏编程知识表示歉意,但是正如标题中所述,我正在努力做到这一点,因此,当我按住键盘上的某个键时,鼠标将被按住一定位置.

I am new to autohotkey and apologize for my lack of programming knowledge, but as stated in the title, I am trying to make it so while I hold down a certain key on my keyboard, the mouse will be held down at a certain location as well.

我遇到的问题是,当我释放键盘上的键(在本例中为向上"键)时,光标仍然保持向下.到目前为止,这是我的代码:

The problem I am having is that when I release the key on my keyboard (in this case the "up" key), the cursor is still kept down. Here is my code so far:

$Up::
Loop{
    if GetKeyState("Up", "P"){
        Click 112, 429, down
    }
    if not GetKeyState("Up", "P"){
        break
    }
}

在此先感谢您的帮助!

下面是代码

F1::
    if( not GetKeyState("LButton" , "P") )
        Click down
return

F1 Up::Click up

阅读文档. http://www.autohotkey.com/docs/;

Read the documentation. http://www.autohotkey.com/docs/;