/build/static/layout/Breadcrumb_cap_w.png

Emulating keystrokes in VBScript without using WshShell.SendKeys

I'm a application developer for a large group of people. Some of these people don't have the WScript.Shell library installed on their computers to use the SendKeys method. IT will not take the time to install this as they don't deem it a necessary feature for everyone. Is there a way I can do keystrokes like CTRL+C or ALT+O without the Shell library?


0 Comments   [ + ] Show comments

Answers (3)

Posted by: bkelly 11 years ago
Red Belt
2

There is AutoIt, that would require just the executable be present and not a legit "installation". Perhpas you could get away with that? With AutoIt you can do some very smart SendKey-like operations, even addressing forms and so forth.


Comments:
  • I can look into that. If IT doesn't see the need for that either, is there an alternative? We can only use software, executables, and scripts that they approve of. - lkp550 11 years ago
Posted by: bkelly 11 years ago
Red Belt
1

You can pipe a response to programs that support it (typically command line tools). To address an installation this will likely not suffice, but using the less than sign you can send the contents of a text file to a command like so:   

  <command> < C:\Temp\response-strings.txt
Posted by: dj_xest 11 years ago
5th Degree Black Belt
0

KEYSTACK can be also a good candidate for you. http://jpsoft.com/help/index.htm


Comments:
  • That looks like another application or executable. I take it there is no way of emulating a keystroke without accessing the Shell library or some type of software? - lkp550 11 years ago
    • Not sure if there is any. Try also the Powershell commands in Windows 7 and see. - dj_xest 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ