Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want to Use Command-Line Switches in EXE
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00470441
Message ID:
00470448
Views:
46
>>>Is it possible to have our own command-line switches in an EXE (similar to how VFP6.exe works), without using the CONFIG.FPW file? In other words, I would like to run a program such as this: MYPROG.EXE -oMyOption
>>>
>>
>>Include a LPARAMETERS statement in the main .PRG of your .EXE. All things that are passed to your code from the startup line (that's not handled already by VFP) will be passed to your .EXE as a string. If nothing is passed to you, the parameter will be a logical .F. or EMPTY() value.
>
>Thanks, Fred. I know about the parameter processing, however how should the command line be structured? We can't (I think!) use MYPROG.EXE WITH Parms. How will the actual command line appear? Is a specific switch needed?

Nope. Just include the data you want after your.EXE. If you need imbedded spaces in it, be sure to include it in quoatation marks. If you don't put things in quotes, they will be passed as multiple parameters.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform