Windows command script that moves mouse cursor N pixels?

前端 未结 4 564
别跟我提以往
别跟我提以往 2020-12-05 08:39

I am trying to find out how to move the mouse cursor N pixels to some direction.... through a command script, since I cannot install anything on my computer.

I basic

4条回答
  •  余生分开走
    2020-12-05 09:28

    You could try installing AutoHotKey. It makes controlling mouse very simple. Example script:

    #MaxThreadsPerHotkey 3
    
    ^g::
    Toggle := !Toggle
    Loop
    {
        If (!Toggle)
            Break
        Click
        Sleep 1000 ; Make this number higher for slower clicks, lower for faster.
    }
    Return
    

    After running script for this example press control+g and it will click every second to keep screen awake. ctrl+g again to stop.

    install at: https://www.autohotkey.com/

    found solution: https://autohotkey.com/boards/viewtopic.php?t=19846

提交回复
热议问题