-2

Here's an example of the issue

Set a=createobject("wscript.shell")
a.sendkey (%117)

I would like to do ALT+U simultaneously in that situation but it is not reading correctly and I am unsure how to fix this issue.

  • Does this answer your question? [CTRL+1 is not working](https://stackoverflow.com/a/34215128) – user692942 Dec 08 '20 at 10:25
  • Does this answer your question? [VBScript Send Key "](https://stackoverflow.com/a/41649037) – user692942 Dec 08 '20 at 10:26
  • All else fails read [the documentation](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/8c6yea83(v=vs.84)). – user692942 Dec 08 '20 at 10:30

1 Answers1

1

Key codes are:

Alt - %
Ctrl - ^

So for Alt + U do:

Set a=createobject("wscript.shell")
a.SendKeys "%U"

For all other key codes refer to https://social.technet.microsoft.com/wiki/contents/articles/5169.vbscript-sendkeys-method.aspx

Ambrish Pathak
  • 3,813
  • 2
  • 15
  • 30
  • Do you realise how many times this question has been asked over the years? – user692942 Dec 08 '20 at 10:27
  • Or just read [the official documentation](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/8c6yea83(v=vs.84)). – user692942 Dec 08 '20 at 10:31