Jump to content
The simFlight Network Forums

FSUIPC P3Dv5 Key_Event firing a mouse macro


Recommended Posts

*** 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 by John Dowson
Moved to main support forum
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by FAR
Link to comment
Share on other sites

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”)

 

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.