Jump to content
The simFlight Network Forums

ipcinit vs ipcReady for connect/disconnect?


pilotjohn

Recommended Posts

Hi,

as the manual clearly describes the both commands are only used when FSUIPC starts and at what state they will start the containing Lua files.

Quote

ipcinit.lua automatically run as soon as FSUIPC has initialised (and for FSX or ESP, connected correctly to
SimConnect).
ipcready.lua automatically run when FS is really “ready to fly”.

To Run / Stop Lua files you use the respective Lua controls.

Quote

or if there's a disconnect will it be called again? Is there something that is called on disconnect?

Please check the FSUIPC Lua Plug-Ins.pdf and FSUIPC Lua Library.pdf from one of the other FSUIPC installation Documents, FSUIPC4 / 5/ 6.

Quote

When there are Lua files in the modules folder, FSUIPC adds a number of new controls for assignment in all of the
usual places – Buttons & Switches, Key Presses, and Axis Assignments. The controls added for each Lua program
are:
Lua <name> to run the named program
LuaDebug <name> to run the program in debug mode (more below)
Ths is actually superseded by the Trace Lua option in FSUIPC4’s Logging Tab.
LuaKill <name> to forcibly terminate the named program, if it is running
LuaSet <name> to set a flag (0-255 according to parameter) specifically for the named program to test
LuaClear <name> to clear a flag (0-255 according to parameter) specifically for the named program to test
LuaToggle <name> to toggle a flag (0-255 according to parameter) specifically for the named program to test
LuaValue <name> to set the ipcPARAM variable to the given parameter, or the axis value when so assigned
There’s also a general Lua control “Lua Kill All” to forcibly terminate all currently running Lua programs.

Thomas

Link to comment
Share on other sites

21 hours ago, pilotjohn said:

Is there something that is called on disconnect?

As well as what Thomas said, if you start a continuously-running Lua plug-in (i.e. one using events) in ipcReady, or via an [Auto] section (or by assignment), then the event.sim function can be used to detect and act upon the closing of the simulator. I'm not sure how well this currently works with MSFS, mind.

Pete

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.