Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stuffing the keyboard buffer
Message
De
03/06/1999 11:33:09
 
 
À
03/06/1999 11:16:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00225979
Message ID:
00225995
Vues:
18
>Does anybody know the correct syntax in VFP to declare and call
>the "keybd_event" API function?
>
>I'm running an external application which when it runs presents the user with a Yes and No button, with the Yes button set as the default. I am trying to automate the execution of this external function as much as possible and want to programmatically press the Enter key to trigger the Yes button and conclude the process.

I think you're going to need to use several API calls to do this, at a minimum, you'll need to know the hWnd of the messagebox so that you can call SetFocus() to point the keyboard focus to the target window, and then issue a keybd_event, since keybd_event doesn't set the context that the keystroke is processed in.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform