Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Aboout run a program using foxpro.
Message
From
25/11/1999 13:58:11
 
 
To
25/11/1999 12:23:20
Jacky Yuen
Myth Group Computer Technology
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00295595
Message ID:
00295612
Views:
17
>Dear all ,
> Besides RUN command in Foxpro ,how can I exec a file ?
> Coz I hate the DOS prompt dialog and I need to pass a set of string to the program (Something like "run abcdefg a.txt b.bat cde".
> I try to find the method in books and the help file of Foxpro ,but still no idea about that .

You can try the API_APPRUN class, which can be downloaded from the FIles Section on UT. This uses the CreateProcess() API, which will run either Windows or DOS Executables.

The native FoxPro RUN command will pass command line parameters to an executable fired by it, with a few exceptions (parameters like /N which are used by the RUN command itself.)

The example given above, assuming that there is an executable named abcdef with a .BAT, .COM or .EXE extension in the current directory or on the search path is completely legal. additional values on the command line are passed as parameters. You can only pass string values to a command line. If you need to pass the content of variables, use macro expansion to extract their values as a part of the command line.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform