Majo
Majo

Reputation: 1

Left Mouse Button Click in vbs

I'm trying to create a program that clicks on a button in my web browser.

The current code:

set sh=createobject("wscript.shell")
sh.SendKeys "{Click, 669 , 674}"
wscript.sleep 100
sh.sendkeys "{Click, 669 , 674}"

I think there is something wrong with the command for the left mouse button.

Thanks for help.

Upvotes: 0

Views: 7888

Answers (1)

Bond
Bond

Reputation: 16311

SendKeys can only send keystrokes.

Check out nircmd (specifically the sendmouse command) or another third-party utility.

Upvotes: 1

Related Questions