FAR Posted March 23, 2023 Report Posted March 23, 2023 (edited) *** Moved from User Contributions sub-forum to main support forum *** Hi Can FSUIPC in P3Dv5 lisent for a defined Key_Event in P3D and when it is presented on the stream fire a FSUIPC recorded mouse macro? Thanks in advance for any reply. Edited March 23, 2023 by John Dowson Moved to main support forum
John Dowson Posted March 23, 2023 Report Posted March 23, 2023 First, you posted in the User Contributions sub-forum where it explicitly states NOT for support requests. Please take care to post in the correct place for support. 5 hours ago, FAR said: Can FSUIPC in P3Dv5 lisent for a defined Key_Event in P3D and when it is presented on the stream fire a FSUIPC recorded mouse macro? Yes, using a lua script. You can use the event.control function to listen for the key event, and in the handling function use the the ipc.macro function to execute the macro. Please see the FSUIPC Lua Library document on how to use these functions. John
FAR Posted March 23, 2023 Author Report Posted March 23, 2023 (edited) Awesome.... Thanks John Not at my SIM pc - but just had some time here at office to play around... can you confirm this will work. The intension is to "Flight Director Toggle" (The mouse macro is working and is saved as FD.MCRO) In the Flight_Director.lua function FLIGHT_DIRECTOR() ipc.macro("FD") end event.control(66288,“FLIGHT_DIRECTOR”) In the FSUIPC.ini [LuaFiles] 1=Flight_Director [AUTO] 1=Lua Flight_Director //Thanks again for a great product Edited March 23, 2023 by FAR
FAR Posted March 23, 2023 Author Report Posted March 23, 2023 SOLVED function FLIGHT_DIRECTOR() ipc.macro("FD") end event.control(66288,“FLIGHT_DIRECTOR”) function FLIGHT_DIRECTOR() ipc.macro("FD: FDtoggle") end event.control(66288,“FLIGHT_DIRECTOR”)
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