Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Aboout run a program using foxpro.
Message
De
25/11/1999 13:58:11
 
 
À
25/11/1999 12:23:20
Jacky Yuen
Myth Group Computer Technology
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00295595
Message ID:
00295612
Vues:
16
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform