如何在按下键时按住鼠标? [英] How to Hold Down Mouse while Key is Pressed?

查看:82
本文介绍了如何在按下键时按住鼠标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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/;

这篇关于如何在按下键时按住鼠标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆