0

I want to move my mouse to different locations on an active screen and also want to perform mouse actions, i.e. right click or left click. I have already tried

Set ab = WScript.CreateObject("WScript.shell")
WshShell.SendKeys("{ClickRight x,y}"

Where x and y are coordinates, but it's not working.

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
simpli_gRV
  • 19
  • 1
  • I like wishful programming. But it never works. You cannot control a mouse with VBScript. You are aware that anything that can be done by mouse should be able to be done by keyboard. EG Shift + F10 is contest menu. TAB changes focus, etc. –  Jun 17 '16 at 07:56
  • You have to make WIN32 API calls to control the mouse. Do to poor documentation it's very difficult to implement. Like Noodles said there is probably a better way. –  Jun 17 '16 at 08:38
  • Perhaps you could detail what it is you're trying to achieve and we can help you find a way to make it happen. – Dave Jun 17 '16 at 09:26

0 Answers0