Jump to content
The simFlight Network Forums

ipcinit vs ipcReady for connect/disconnect?


pilotjohn
 Share

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

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.