Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending keystrokes to an external window/application
Message
De
19/07/2013 12:37:13
 
 
À
19/07/2013 10:41:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01578883
Message ID:
01578894
Vues:
50
>Hi
>
>I'm using the following code to run an external Java application, where lcFileName = "MyJava.jar"
>
>
>DECLARE INTEGER ShellExecute IN shell32.dll ; 
>	INTEGER hndWin, ; 
>	STRING cAction, ; 
>	STRING cFileName, ; 
>	STRING cParams, ; 
>	STRING cDir, ; 
>	INTEGER nShowWin
>
>ShellExecute(0,"open",lcFileName,"","",1)
>
>
>Is there any way that I can then send a "carriage return" to that Java App, the default command button on my Java App is highlighted and the user only needs to press "Enter" for it to run. I'd like to be able to run the application automatically?
>
>Regards

Perhapes look at the WinAPI SendKey function. But you will need to perform it before the ShellExecute. It may work.
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform