Jump to content
The simFlight Network Forums

Keypress and delay


guit33
 Share

Recommended Posts

Hello

I use fsuipc 7 with MFS2020.

I want when I press one of my joystick button to have a delay of 30s and then activate the key H (assign to function in MFS2020: engine 1 deice) (it to simulate the inertial separator).

So I create a lua files:

ipc.sleep(30000) 

ipc.keypress(72) (I find 72 is for H in the documentation)

But it does not work, any idea ?

Thanks

 

 

 

delay.lua

Link to comment
Share on other sites

20 hours ago, guit33 said:

ipc.keypress(72) (I find 72 is for H in the documentation)

But it does not work, any idea ?

What is 'H' assigned to in MSFS? Which aircraft?

13 hours ago, guit33 said:

After searching it seems that the good control is ipc.control and not keypress

I tried 65732+72=65804 ipc.control (65804) 

What is '65732 + 72' supposed to do?  As listed in the Controls list, 65732 is assigned to "EXIT"!  Adding 72 to it changes it to 65804 which is "APP ATT HOLD ON" -- i.e attitude hold. Does your aircraft have such a facility in its autopilot? Did you turn the AP on first?

Pete

 

Link to comment
Share on other sites

1 hour ago, guit33 said:

I have assign H to a shortkey in MFS 2020: for me H= deice engine 1 (I use the TBM930)

You could try the proper control number instead. This is in the controls list:

66484   ANTI_ICE_TOGGLE_ENG1

There's also

66488   ANTI_ICE_SET_ENG1

for which I would guess a parameter of 1 sets it on, and 0 sets it off. For this one:

67012   ANTI_ICE_GRADUAL_SET_ENG1

I'm not sure at all what that does, if anything.

As to why a keypress isn't working, you need to ask John. You should be posting in the MSFS subforum above for MSFS questions.

Pete

 

Link to comment
Share on other sites

23 hours ago, guit33 said:

But it does not work, any idea ?

Try activating lua debug logging as well as logging for Buttons & Keys and produce a FSUIPC7.log file and show that to me, together with your FSUIPC7.ini.

20 minutes ago, Pete Dowson said:

You should be posting in the MSFS subforum above for MSFS questions.

I will move this topic to the FSUIPC7 / MSFS support forum.

John

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.