Sending Keystrokes to 16-bit Applications from 32-bit Windows and 32-bit Winbatch
Keywords: sendkey sendkeysto 16-bit Applications
Question:
I'm sending keystrokes to Win16 apps.Why are keys being "lost" if the WinWaitExist has waited (forever with -1) until the "Window Name" exists? If you have to specify a time delay, you will ALWAYS find a case when your guess is wrong. If you tell me that there is a time between a Window Existing and it being able to accept input, should I then be asking for a function something like WinWaitExistForInput?
Answer:
When running 32 bit WinBatch on a 32 bit OS it sends keystrokes "blind" to 16 bit applications. The 16 bit apps are unable to communicate with the operating system that it is ready to accept more keystrokes, so all WinBatch can do is simply dole them out.16 bit WinBatch on Windows 3.1 can handle 16 bit applications very well. It this cross platform stuff that is murder.
I don't know if running the 16 bit WinBatch on a 32 bit OS trying to control a 16 bit app might help. I vaguely recall it might.
32-bit apps communicate with the OS so keystrokes can be sent to 32 bit apps with a greater degree of reliability.
This is a fundamental weakness with 16 bit apps on a 32 bit OS.
Article ID: W14299Filename: Sending Keystrokes to 16bit Apps from 32bit.txt