>>>We need to pass a drive letter to our VFP .exe - this will allow us to create a shortcut on a client's system. He insists that he doesn't want the user to have to enter the drive letter of a cd tower. I just can't find how to pass the parameter.
>>>
>>
>>You need a PARAMETERS or LPARAMETERS statement in the main program module as the first executable statement in the module; if you want to be able to pass more than 1 parameter, you'll need more than one entry. For example:
>>
>>* MAIN.PRG
>>LPARAMETERS uParm1, uParm2, uParm3, uParm4, uParm5
>>
>>Would allow for 0 to 3 values to be passed in on the command line; use PCOUNT() to determine how many were actually passed in. If the program create is MyApp.EXE, yyou could invoke it with "I" as a value by having the command line:
>>
>>
C:\MyDir\MyApp.EXE I>>
>>All values passed on the command line will be recevied as a character value; if you need to pass in a character string that includes characters that are seens as delimiters (like spaces), encapsulate the string in
"s:
>>
>>
C:\MyDir\MyApp.EXE "Mary had a little lamb">>
>>would pass
Mary had a little lamb as uParm1, with all others containing a logical .F. If instead, you started it with:
>>
>>
C:\MyDir\MyApp.EXE Mary had a little lamb>>
>>uParm1 would contain
Mary, uParm2 would contain
had, etc.
>>
>>Using LPARAMETERS scopes the parameters as local to MAIN; a PARAMETERS statement scopes the parameters as PRIVATE.
>>
>>>We would like to pass "I", for instance...
>>>
>>>We tried using
>>>
>>>I
>>>-I
>>>-"I"
>>>/I (this one worked, but it also sent the /
>>>
>>>I give up... :)
>>>
>>>Steve McMahon
>>>ZDI
>>>San Diego
>
>One more note...the parameters will always be passed as character.
I think I said that already; command line values are always received as character strings, if present, or a logical .F. if omitted. If you invoke a VFP .EXE from within another VFP .EXE via DO, you can pass values other than as characters.