Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send Key Strokes to an APP not VFP
Message
De
31/01/2001 16:26:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00470543
Message ID:
00470926
Vues:
38
>In a somewhat related thing to this, George have you looked in to the Events thing (can't remember what it's called) that VFP generates to external apps? Specifically at design time I'm talking about. It was demonstrated at DevCon where they repeated mouse clicks and keystrokes in a VFP wizard. It was when they demo'd how all objects in 7 are com objects so they play well with the visual and hearing impaired tools.
>

VFP 7 has set up all native VFP controls to publish an IAccessible COM interface for user-rendered controls; this behavior is not implemented under VFP 6 or earlier. The IAccessible interface is used by Active Accessibility, and could be hooked to control individual controls, but -not until VFP7-.

>>>This merely activates the program but the keys go into the vfp app.
>>>
>>>Maybe there is some API call's I can use?
>>>
>>>Thanks
>>
>>Depends on the keystrokes, but here's a short sample from the second artricle in the Windows Script Host series that Ed Rauh and I have written. The series began in Sept. of last year.
* Create the Shell reference
>>oShell = CREATEOBJECT("WScript.Shell")
>>DECLARE Sleep IN Win32API;
>>    INTEGER dwMilliseconds
>>oShell.Run("Notepad")
>>oShell.AppActivate("Untitled – Notepad")
>>= Sleep(100) && Pause VFP for a 1/10 of a second
>>oShell.SendKeys("This sends a sentence to Notepad from VFP.~")
Naturally, this requires that the WSH be installed. You can find the articles on-line at www.vfug.org
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