如何移动鼠标光标并单击?

Sta*_*aly 3 windows batch-file mousemove mouseclick-event

像我的问题,我该怎么办?我已经开始创建一个打开网站的.bat文件,现在我希望它将光标移动到屏幕的特定X'Y位置并左键单击.有没有办法可以在.bat或任何其他类型的脚本中执行此操作?

在此先感谢,-Stam

npo*_*aka 6

检查mouse.bat - 它是一个自编译的C#/批处理文件,不需要外部工具,源可见且可编辑.

例子:

//clicks at the current position
call mouse click

//double clicks at the current position
call mouse doubleClick

//right clicks at the current position
call mouse rightClick

//returns the position of the cursor
call mouse position

//scrolls up the mouse wheel with 1500 units
call mouse scrollUp 150

//scrolls down with 100 postitions
call mouse scrollDown 100

 //relatively(from the current position) moves the mouse with 100 horizontal and 100 vertial postitions
call mouse moveBy 100x100

//absolute positioning
call mouse moveTo 100x100

//relative drag (lefclick and move)
call mouse dragBy 300x200

//absolute drag
call mouse dragTo 500x500
Run Code Online (Sandbox Code Playgroud)