質問

I'm trying to get a VBScript to left/right click. I thought there might be a way to using the WshShell.SendKeys method, but it didn't include anything that would help me. How would I go about doing this?

役に立ちましたか?

解決

This is a hack, but you can....

  1. right click
  2. then go down the menu
  3. then hit enter

Here it is :

Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("+{F10}")
WshShell.SendKeys "{DOWN}"
WshShell.SendKeys "{ENTER}"

他のヒント

This Simulates a right click WshShell.SendKeys("+{F10}") I don't know how to simulate a left click though

WshShell.SendKeys("-{F10}") to simulate a left click

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top