Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finally, a way around Outlook/MAPI dialogs on sending em
Message
De
28/05/2002 08:30:48
 
 
À
28/05/2002 08:06:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00655520
Message ID:
00661944
Vues:
26
>I think I don't need to dedect is the error occured or not.
>I need to simulate a enter key press or mouse click to the center of screen.
>If erorr messagex box appers, this is treated as response to this error.
>If erorr message does not occur,this is ignored.
>I think that it must be possible to implement mouse clicking to a specific
>position in screen as macro recorders work in such way.

I don't think you understand what you want to do. You want to direct a keystroke/mouse click (a Windows event) to the event handler of a particular Window; it has nothing to do with the geometric position of the Windows cursor (you need to ensure that the correct Window has focus at the time the Windows event is dispatched, not direct something at random to whatever is at the top of the Z-Order at a particular screen location.) That's what AppActivate() does - it causes the designated Window to become the foreground Window based on the Window title text. Once the correct Window has focus, SendKeys() dispatches a keystroke message - equivalent to the reception of a WM_KEYDOWN and WM_KEYUP - to the foreground Window. If you don't give the proper Window focus, the wrong app, or wrong child Window of the desired app, receives the keystroke, and the message recipient decides what to do with it. The physical location on-screen of the Window has nothing to do with what happens.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform