Link to home
Start Free TrialLog in
Avatar of steve44
steve44

asked on

possible to send mouse clicks with vbs?

I know it's possible to sendkeys with vbs, is it possible to send mouse commands such as a right click? If possible what would be the statement? thanks
Avatar of edwardiii
edwardiii

Hi, steve44.

One of the answers at this EE post works for me:
https://www.experts-exchange.com/questions/20903665/vbs-disable-right-click-find-keypress.html

'Comment from TheKenman
'Date: 03/02/2004 04:55AM PST  


'Right click = onContextMenu.

<html>
<head>
<SCRIPT language="VBScript">
Function rClicky()
       window.event.returnValue = false
       rClicky = msgbox("No r-clicky!!")
End Function
</SCRIPT>
</head>
<body onContextMenu="rClicky()">
right-clicky anywhere...
</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of Burbble
Burbble
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Whooops VB *Script*  :)
Hi, steve44.

How did you get Burbble's code to work with VB Script?
Maybe he meant VBA?

Hmm