View Full Version : How to get response
eric_a
07-06-2006, 11:49 AM
I can use the WScript Sendkeys method to send
keystrokes to the active window but how can I
check the response coming back?
motoflop
07-06-2006, 02:02 PM
You have activated some application and sending keystrokes to it. From application's point of view user is using keyboard and it doesn't know anything about your script. So you cannot get any responses back to your script. Your script can only send blindly keystrokes, but it cannot know if that other application really does something. One way is to use long enough delays between each keystroke so that application has some time to react them.
There are other hotkey/macro software, which can monitor application states. You can for example send some keystrokes and then check if certain window is then active or dialog with certain button has popped up. I'm not experienced with wscript, so maybe you could do similar checks with it too.
Powered by vBulletin™ Version 4.1.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.