VBS send mouse clicks?

后端 未结 5 2082
陌清茗
陌清茗 2020-12-18 12:58

I need send mouse clicks from VBS. Like SendKeys. I have searched whole google, it seems there is no such function for VBS. Can you give me some solution?

5条回答
  •  太阳男子
    2020-12-18 13:34

    Try

     Dim x
     set x=createobject("wscript.shell")
    
     x.sendkeys"{CLICK LEFT,50,60}"
    

    or

     x.SendKeys("+{F10}") 'for a right click
    

    If neither of those work for you I would suggest using something like Autoit or autohotkey, using AutoHotKey you could write a macro that does the clicking and then call the script from your VBScript.

提交回复
热议问题