0 pts.
 Run exe from Forms 6i
Hi Can I run an external exe app from a when-button-pressed trigger? If the exe expects input parameters and outputs a code can these also be processed by forms 6i? If so, how do I acheive this? My OS is Windows 2000. Thanks.

Software/Hardware used:
ASKED: December 23, 2005  12:51 PM
UPDATED: December 27, 2005  10:27 AM

Answer Wiki:
Hello, Yes, it is possible to run an external exe from a when-button-pressed trigger. We do this by the call of the procedure win_api_shell.winexec which is part of the library d2kwutil (we start the program acrobat reader). The Command-Parameter can include input-parameters for the external exe. I don't know if it is possible to handle the output of an external exe because we do not need this feature. I hope this helps.
Last Wiki Answer Submitted:  December 27, 2005  4:58 am  by  Mkleand   0 pts.
All Answer Wiki Contributors:  Mkleand   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can run an external exe using the DDE package. With this package you can set the focus to that app, end it, etc… but I don’t remember if it’s possible to process the output of the app (see help).

Here is an example:

Declare
myApp PLS_INTEGER;
Begin
myApp := DDE.App_Begin(AppString,DDE.APP_MODE_MINIMIZED);
DDE.App_Focus(myApp);
End;

AppString can be a string with the exe name (with path if needed) and command line parameters.
myApp is a number used to identify the application (like a handle).

Hope it helps.

 63,580 pts.