Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Command Line Parameters and Drag/ Drop Launch
Message
De
31/01/1999 06:22:07
 
 
À
30/01/1999 22:12:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00182225
Message ID:
00182247
Vues:
11
>>Is it possible to create a compiled application (.exe) that can accept command line parameters such as a file name? If so, how do you code for this in the program?
>
>Yes, it's possible. Your main prg must contain a PARAMETER or LPARAMETER command at its top. From there, it's like having a usual procedure. The only difference is that all parameters received by an exe are of char string type. The problem with the file names is that they may contain spaces. In this case, the operating systems considers them as separate parameters and will pass them to you as multiple parameters.
>

There's a solution to that - encapsulate the argument in quotes.

>>Also, can you create an application that can be launched by dropping a file (or shortcut) icon on the application?
>
>I never tested this, but I believe that this is done automatically in Win 95, NT.
>
>Vlad
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