Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Autohotkey 自动热键-忽略按下的键_Autohotkey - Fatal编程技术网

Autohotkey 自动热键-忽略按下的键

Autohotkey 自动热键-忽略按下的键,autohotkey,Autohotkey,我希望我的自动热键脚本在按下键盘上的shift+3键后有鼠标单击,忽略按住shift键 例如,我尝试过这样做: +3:: SetMouseDelay, 0 MouseGetPos, xpos, ypos Send {Shift Up} BlockInput, on Send {Shift Up} MouseClick, right, uhxpos, uhypos Sleep, 41 MouseClick, left, yourxpos, yourypos MouseMove, xpos,

我希望我的自动热键脚本在按下键盘上的shift+3键后有鼠标单击,忽略按住shift键

例如,我尝试过这样做:

   +3::
SetMouseDelay, 0
MouseGetPos, xpos, ypos
Send {Shift Up}
BlockInput, on
Send {Shift Up}
MouseClick, right, uhxpos, uhypos
Sleep, 41
MouseClick, left, yourxpos, yourypos
MouseMove, xpos, ypos
BlockInput, off
return
甚至试图等到轮班被物理释放后再等待,仍然没有成功

+3::
SetMouseDelay, 0
MouseGetPos, xpos, ypos
KeyWait, +  
MouseClick, right, uhxpos, uhypos
Sleep, 41
MouseClick, left, yourxpos, yourypos
MouseMove, xpos, ypos
return

非常感谢您的帮助。

使用
KeyWait,Shift
而不是
KeyWait,+
尝试在{Shift Up}之前发送{Shift Down},也许您应该用SendInput替换发送:

+3::
  MouseGetPos, xpos, ypos
  SetMouseDelay, 0
  Sleep, 100
  SendInput, {Shift Down}
  SendInput, {Shift Up}
  MouseClick, right, uhxpos, uhypos
  Sleep, 41
  MouseClick, left, yourxpos, yourypos
  MouseMove, xpos, ypos
Return

那么,您在按住shift键的同时按下了
shiftf3
?或者是您希望在按下shiftf3后运行例程,但尽管shift可能被按下?也许您的操作方式不对。通过尝试阻止
shift
,您到底想要实现什么?