pilotjohn Posted September 22, 2020 Report Posted September 22, 2020 Which IPC facilities can I use to trigger something (execute external program) on FSUIPC connect/disconnect? Should I assume that ipcinit is called only once, on first connection, or if there's a disconnect will it be called again? Is there something that is called on disconnect?
Thomas Richter Posted September 23, 2020 Report Posted September 23, 2020 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
Pete Dowson Posted September 23, 2020 Report Posted September 23, 2020 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
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