AHK:有人可以让我的脚本按住左右鼠标拖动鼠标吗?

时间:2019-12-14 22:53:58

标签: autohotkey

大家好,我在AHK中有此条。...当我按左右鼠标时,鼠标将开始移动....但是我想按住左右拖动鼠标,所以当我不按住时它停止了,就像“如果条件”,如果不按住鼠标就会停止。

脚本:

~RButton & LButton:: ;This is just a note
While GetKeyState("RButton", "P") AND GetKeyState("LButton", "P")
{   
     DllCall("mouse_event", uint, 1, int, -3, int, 3, uint, 1, int, 0)
     Sleep, 10
     DllCall("mouse_event", uint, 1, int, -3, int, 3, uint, 0, int, 0)
     Sleep, 10
     DllCall("mouse_event", uint, 1, int, -3, int, 3, uint, 1, int, 0)
     Sleep, 2
     DllCall("mouse_event", uint, 1, int, -3, int, 3, uint, 0, int, 0)
     Sleep, 10
     DllCall("mouse_event", uint, 1, int, -3, int, 3, uint, 1, int, 0)
     Sleep, 10
     DllCall("mouse_event", uint, 1, int, -3, int, 3, uint, 0, int, 0)
     Sleep, 10
} Return


F12::ExitApp

1 个答案:

答案 0 :(得分:0)

尝试一下

   F10::

   Send {F1 down}{F12 down}

   KeyWait F10

   Return

  F10 up::Send {F12 up}{F1 up}

您可以使用按键更改按键