Jump to content
The simFlight Network Forums

Alternate Startup


Recommended Posts

Using a registered copy of FSUIPC,  is the a way to have an alternate startup such that we could pass a parameter on the FSX startup or some other mechanism that would allow us to conditionally execute the  RunIf   statements?

I have a particular runIf  statement that starts a program that inturn launches a batch file to startup other programs.  If I am debugging  or must restart FSX/P3D after a crash, I want to be able to exclude re-running the RUNIf programs.  

I had thought about a lua script or even having   a 2nd instance of FSX.exe  ( FSXDebug.exe) which was just a copy of fsx.exe renamed , but would have to also have a copy of fsx.cfg (and not sure what else). This could result in out of sync config files.

I am not sure if there is even a way that FSUIPC could see any parms sent to the FSX program startup and be able to read the 'command line' that was used to launch it. FSUIPC runs inside FSX so it should have access to that info?

Thoughts, Suggestions?

Thanks

Bruce

Link to comment
Share on other sites

2 hours ago, bcarson said:

Using a registered copy of FSUIPC,  is the a way to have an alternate startup such that we could pass a parameter on the FSX startup or some other mechanism that would allow us to conditionally execute the  RunIf   statements?

I'm afraid the RunIf parameters do not support conditional actions. You could do it by having two different FSX.EXE copies, in the same folder, with different names (i.e. make  copy and rename one). This would allow you to have alternative FSX.CFG files as well as alternative FSUIPC4.INI (and FSUIPC.KEY) files. A bit of a messy solution though. Described in the FSUIPC documentation somewhere.

Alternatively you could have a Lua plug-in program which checked something easy enough to set (say, the starting flight or aircraft name or type when "ready to fly", and ran the appropriate programs then.

I think most folks who want different configurations of programs running use one of the several external starters available, like perhaps SimStarter (see Aerosoft website).

Pete

 

Link to comment
Share on other sites

I use ext.runif() in FSX/Modules/ipcInit.lua for exactly this feature:

quickstart = false

ext.runif('C:\\Program Files (x86)\\EZCA2\\ezlauncher.exe')
if not quickstart then
  ext.runif('D:\\FSX\\fsrealtime\\FSRealTime.exe', EXT_CLOSE)
  ext.runif('D:\\FSX\\WhereAreMyAircraft\\WhereAreMyAircraft.exe', EXT_KILL)
  ext.runif('D:\\FSX\\AivlaSoft-EFB\\AivlaSoft.Efb.DataProvider.exe')
  ext.runif('D:\\FSX\\AS16_FSX\\AS16.exe', EXT_CLOSE)
  if ipc.buttons("Y") >= 256 then
    ext.runif('D:\\FSX\\SPAD\\Spad.exe')
    ext.runif('D:\\FSX\\VRInsight\\bin\\VRiSim.exe')
  end
end

If I want FSX to start quicky (with most runifs disabled), I just set "quickstart = true".

The ipc.buttons() check is done to see if my yoke is connected.

You could invent more conditions, e.g. if a certain file exists, and write a simple batch file to create or remove this file, and then start your simulator.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.