bcarson Posted October 3, 2017 Report Posted October 3, 2017 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
Pete Dowson Posted October 3, 2017 Report Posted October 3, 2017 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
ThomasAH Posted October 4, 2017 Report Posted October 4, 2017 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now