Support Forums

Why not .SendKeys ?

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.
User avatar
jragan18
Posts: 1
Joined: Mon Jan 19, 2015 8:17 am

Why not .SendKeys ?

Postby jragan18 » Mon Jan 19, 2015 8:27 am

Why do most VBScript writers HATE to use SendKeys ?

I use it a lot and I have never had trouble with it.

What I hear most is that it does not work often enough and it bugs out a lot.

I am not sure what "bugs out a lot" means or in what instance it is that it does not work.

Can somebody who has had a lot of experience with this please fill me in?

FYI, I do not use this for pushing server side installs and understand the issues with that.
User avatar
SAPIEN Support Forums
Posts: 945
Joined: Wed Dec 03, 2014 2:26 pm

Why not .SendKeys ?

Postby SAPIEN Support Forums » Mon Jan 19, 2015 8:27 am

This is an automated post. A real person will respond soon.

Thank you for posting, jragan18.

Here are some hints to help you get an accurate and complete answer to your question.

Ask in the best forum:
If you asked in the wrong forum, just copy your question to the right forum.

Anticipate follow-up questions!

Did you remember to include the following?
    1. Product, version and build
    2. 32 or 64 bit product
    3. Operating system, e.g. Windows 7 64 bit.
    4. Attach a screenshot, if applicable
    5. Attach logs, crash reports, etc., in a ZIP file
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
User avatar
jvierra
Posts: 10044
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Why not .SendKeys ?

Postby jvierra » Mon Jan 19, 2015 8:41 am

SendKeys is not usable in a commercial way because other programs very often interfere with it. There is no way to prevent this. If you are lucky it will work. SendKeys is not supported by Microsoft anymore (deprecated). It was carried over from Windows 98 for compatibility reasons.

The internal SendKeys used in a form to send keys to the form is usable but that is not the same SendKeys.

The issue with SendKeys is that it targets the active window. The active window can change in an instant and the keystroke will end up in the wrong application which could be disastrous.

Return to “VBScript”

Who is online

Users browsing this forum: No registered users and 6 guests