[Gambas-user] Entry value for gambas project

Gian bagoneo at ...69...
Tue Apr 21 10:56:19 CEST 2015


Il 21/04/2015 09:55, bill-lancaster ha scritto:
> I want to start a Gambas programme from another Gambas programme.
> What would be the best way to pass a value to the programme?
>
> At the moment I write the value to a file from the first programme and read
> it in the second one. then open the ne prog with:-
>      Exec [User.Home &/ "GambasFolder/GambasExec/MusicFiling.gambas"]
> where the executable version of the sencond programme resides.
>
> Perhaps gb.settings would be a bit more elegant but maybe the best would be
> to use the _new() sub in the second programme but how to call the second
> programme?

AFAIK, to passing the parameters is correct to use Shell or Exec and go 
to the Program_2 with Path/Program_2 “param_1, param_2, param_n”.
In Program_2 you can read with Application.Args or gb.args.
In IDE you can use the window “Project>Arguments” to Write and Read.
Regards
Gianluigi




More information about the User mailing list