1. help paramete
Hi,
1.-Thanks again to Michael Bolin for his explanations.
.
2.-Does somebody know how to add a parameter when launching
an .EXE (Euphoria) program ?
e.g. Mygame /5 should initiate a variable
in the pgm Mygame.exe (difficulty level 5).
Thanks for any suggestion.
-- Jean Hendrickx. j.hendrickx at euronet.be
2. help paramete
Jean Hendrickx wrote:
>Does somebody know how to add a parameter when launching
> an .EXE (Euphoria) program ?
> e.g. Mygame /5 should initiate a variable
> in the pgm Mygame.exe (difficulty level 5).
> Thanks for any suggestion.
Try using command_line(), which, for a stand alone file, returns the path=
of the file for the first 2 elements, and then any parameters passes to i=
t.
For example:
sequence cmd
cmd =3D command_line()
If you typed MyGame mygame.dat 5, cmd would look like
{"C:\MYFILES\MYGAME.EXE","C:\MYFILES\MYGAME.EXE",
"mygame.dat","5"}
Basically, if you want to find the parameter, use something like
sequence junk
integer difficulty
junk =3D value(cmd[3]) --will find first parameter and convert to number=
difficulty =3D junk[2]
I hope this helps out a little.
Regards,
Bryan Watts