Click here to Skip to main content
15,887,425 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am on windows 10 trying to make a program that is a fake infection. Can you help me?
Im trying to sendkeys (win +) in vbs but nothing seems to work.

What I have tried:

I tried doing this:
set shl = CreateObject("wscript.shell")
shl.sendkeys "^{ESC}+"

but it just opens the windows start menu. Can you help me?
Posted
Updated 18-Apr-21 8:30am

1 solution

Using SendKeys, there is no way to hold the Window key like you can with Shift or Ctrl or Alt. What you're sending in your code is actually Ctrl-Esc then hitting the Shift key and releasing it. That combination will open the Start menu but then do nothing at all.

If you're trying to type a plus sign in the search box, you have to enclose the "+" character in curly brackets:
C#
SendKeys.Send("^{ESC}{+}");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900