Frage

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?

War es hilfreich?

Lösung

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}"

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top