Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending keystrokes to an external window/application
Message
From
19/07/2013 12:37:13
 
 
To
19/07/2013 10:41:15
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01578883
Message ID:
01578894
Views:
52
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform