Command Line parameters 
Author Message
 Command Line parameters

Does an executable created by VFP have the ability to
accept a string value (such as a path) via a command line
parameter?  For example, "project.exe c:\test\input.txt",
where the path is saved as a variable so that my main.prg
can use it to find a file.  Does anybody know if I can do
this in VisualFoxPro?

Thanks,
Patrick



Mon, 30 Aug 2004 04:08:02 GMT  
 Command Line parameters
i had to ask about this one as well , it's simple but not necessarily
obvious
use the lparameters statememt to grab any commandline args the same as you
would with any other procedure


Quote:
> Does an executable created by VFP have the ability to
> accept a string value (such as a path) via a command line
> parameter?  For example, "project.exe c:\test\input.txt",
> where the path is saved as a variable so that my main.prg
> can use it to find a file.  Does anybody know if I can do
> this in VisualFoxPro?

> Thanks,
> Patrick




Mon, 30 Aug 2004 04:43:01 GMT  
 Command Line parameters
Absolutely, just start with a parameters or lparameters statement and you'll
be fine. If you need to pass them to a form, however, you'll need to wrap
the do form... in a .prg: gather the parameters in the .prg and then do form
with ...

--
Lew Schwartz
Visual FoxPro Solutions
Database Programming and Design
www.clsystems.com
718-336-8225

Quote:
> Does an executable created by VFP have the ability to
> accept a string value (such as a path) via a command line
> parameter?  For example, "project.exe c:\test\input.txt",
> where the path is saved as a variable so that my main.prg
> can use it to find a file.  Does anybody know if I can do
> this in VisualFoxPro?

> Thanks,
> Patrick




Mon, 30 Aug 2004 04:41:59 GMT  
 Command Line parameters
Just put a PARAMETERS statement and the variable(s) you want to use as the
first line in your main.prg

For example:

PARAMETERS p_cFile

--
William Fields
MCSD - Microsoft Visual FoxPro
MCP - Win2k Pro
US Bankruptcy Court
Phoenix, AZ

Beer is proof that God loves us
and wants us to be happy.

                            - Benjamin Franklin


Quote:
> Does an executable created by VFP have the ability to
> accept a string value (such as a path) via a command line
> parameter?  For example, "project.exe c:\test\input.txt",
> where the path is saved as a variable so that my main.prg
> can use it to find a file.  Does anybody know if I can do
> this in VisualFoxPro?

> Thanks,
> Patrick




Mon, 30 Aug 2004 05:44:07 GMT  
 Command Line parameters
Yes it does. I use it to pinpoint an ini files. put the parameters in the
main prog file
Allen


Quote:
> Does an executable created by VFP have the ability to
> accept a string value (such as a path) via a command line
> parameter?  For example, "project.exe c:\test\input.txt",
> where the path is saved as a variable so that my main.prg
> can use it to find a file.  Does anybody know if I can do
> this in VisualFoxPro?

> Thanks,
> Patrick




Mon, 30 Aug 2004 06:02:04 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How are command line parameters passed/used?

2. Passing command line parameters to a VFP EXE

3. vfp6 command line parameters???

4. Command line parameters

5. Frustrated by command line parameters in visual foxpro 5

6. Foxpro 2.6 Debugger, Starting with Command Line Parameters

7. Passing command line parameters project EXE

8. Command Line Parameters

9. vfp6 command line parameters???

10. Command Line Parameters

11. command line parameters in visual foxpro 5

12. newbie - command line parameters to open a .dbf?

 

 
Powered by phpBB® Forum Software