PiBoSo Official Forum

GP Bikes => General Discussion => Topic started by: sdecorme on September 05, 2016, 07:11:40 AM

Title: launch GPBike with parameters
Post by: sdecorme on September 05, 2016, 07:11:40 AM
Hi,
I've found on the forum a gpbike launcher that works perfectly :
http://forum.piboso.com/index.php?topic=376.0 (http://forum.piboso.com/index.php?topic=376.0)
And would like to make mine because I need more parameters.
Apparently it launch the game in testing mode but I don't find the the testing file , so I think it works with a shell command to launch the game.
Is someone have information about that ?
Thanks you
Title: Re: launch GPBike with parameters
Post by: sdecorme on September 05, 2016, 07:21:40 AM
Sorry it works with the testing file so report here to find how it works  ;D
http://forum.piboso.com/index.php?topic=13.0 (http://forum.piboso.com/index.php?topic=13.0)
Title: Re: launch GPBike with parameters
Post by: sdecorme on September 05, 2016, 09:58:16 AM
done it my launcher make the testing.ini but when I launch core.exe with parameters "-testing".
The game normally mode with the menu at startup nad when I exit the game , after the yes to exit the game launch the testing mode with the parameters written in the testing.ini file.

the testing.ini :
Quote[bike]
bike_id = msm_125rr_07
paint=
[track]
track_id = Grobnik_GP v0.2_NDS
[settings]
weather_realistic= 0
weather_conditions= 0
temperature= 20
wind_direction= 0
wind_speed= 5
track_conditions= 0


and my function to launch the game look like this (I work in c#)

            ProcessStartInfo startInfo = new ProcessStartInfo("core.exe");
            Process.Start(startInfo);
            startInfo.Arguments = "-testing";
            Process.Start(startInfo);


Thanks you



Title: Re: launch GPBike with parameters
Post by: sdecorme on September 05, 2016, 11:29:02 AM
The working solution is
ProcessStartInfo startInfo = new ProcessStartInfo("core.exe");
            startInfo.UseShellExecute = false;
            startInfo.Arguments = " -testing";
            Process.Start(startInfo);