VBS控制鼠标移动和点击(附源代码下载)

森思:想用vbs来控制鼠标的移动和点击,虽然按键精灵可以做到,但做这么简单的事情不想启动那么大一个程序,所以自己用VC写了一个小程序,可以让VBS来控制鼠标移动和点击。

用法:

移动鼠标到桌面坐标200,50的vbs命令如下:

CreateObject("WScript.Shell").Run "mouse.exe m,200,50"

点击鼠标左键的vbs命令如下:

CreateObject("WScript.Shell").Run "mouse.exe l"

点击鼠标右键的vbs命令如下:

CreateObject("WScript.Shell").Run "mouse.exe r"

双击鼠标左键的vbs命令如下:

CreateObject("WScript.Shell").Run "mouse.exe d"

原文地址:https://www.cnblogs.com/jinjiangongzuoshi/p/3821381.html