MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
myflightdeck
Posts: 16
Issue: When you do a screen recording macro in FSUIPC and press a button in the aircraft, FSUIPC does not release that button from being pushed. It stays pushed in.

If you examine the contents of the macro file, you will notice the mouse click was assigned a #3 indicating that it was pressed. To release the button from being pressed a new assignment of #13 must be applied.

In order to do this you have to create a second macro to tell the button to release and call that macro in the input area in MF for "On Release"

I decided to create two macro's
1. For the pressing of the button
2. For the releasing of the button

The first macro had an assignment of #3 and the second #13. Thus allowing the button to be pressed and released.

In MobiFlight you can assign the Macro Name and Variable in the Input area "On PRESS". On Release I tried to assign my second macro containing the #13 (Left Click Release).

Mobiflight would not process the "On Release" command and so as a result when I pressed the button the button would stay pressed in and not release.

I attempted a work around: I went into FSUIPC and created a Key Press and assigned it to the second macro and then went back into MOBIFLIGHT and assigned that key press to the button. This time when the button was pressed, it triggered the key combination that fired off the second macro and this time it worked. The button released.

This method works but it seems like an un-needed work around. If the "On Release" would just allow us to call a Lua Macro and we specify the macro like the "On Press", it would solve the issue without making us create a key combination in FCUIPC and then a second step to assign that in MF.

It is possible that the "On Release" is supposed to be able to be assigned a LUA MACRO since it is in the drop down and this might just be a bug inside of MobiFlight.

Would the development team please test the above mentioned issue and verify my findings? If it is a bug, is it possible to move this up on the priority list. I am currently mapping a full cockpit CRJ700 and the amount of work this is going to take to assign each button release will be insane! If there is anyway to allow the "Input: On Release to fire off an alternative macro to the "On Press" it would solve this issue.

Or if there is alternative way for me to fire off the release of the left click. Please Please Please share..

Thank you for your consideration.

Thanks
[Last edited by myflightdeck, 2019-12-31 23:32]
2019-12-31 22:56
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1441
Sure! I will have a look at it. It definitely should work for OnRelease too.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2020-01-01 04:28
Avatar
myflightdeck
Posts: 16
https://www.youtube.com/watch?v=1LHVjkPf25U

Here is a video that shows the issue.
2020-01-01 15:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
Hi

In case i not be able to test this at the moment i just have a idea and you maby can help me figure out....

1. What is the Problem on the Release Macro ?
In your video i see you already use "keysend" for the release instead of "Lua Macro" in the Mobiflight Tab.
Is THERE the Lua Macro not available ??? Or do you just use Key cause it won´t work.

If its available but not work my first idea is.... Maby FSUIPC not accept a Macro-trigger from a external Programm aslong a former macro is running.

So simple test.... Set for Press and release your macros ( with different 3/13 numbers) ..... But now Press the button..... Wait 5 seconds and then release the button.
Does it work now ??? If yes then the momentary usage ( press and release within a part of a second) is to fast to transmit 2 different macros.

Another idea..... Are you still advanced with creating and using macros ??
As i know you can include multiple actions within one macro..... If you just need the release of the virtua Button ( and this release not occure in a other action) then maby you can include in your macro a second line that make the release directly behind the push.
So mobiflight just trigger ONE Macro..... And this will press and release the virtual button in one sequence.
Good Luck !
2020-01-01 19:59
Avatar
myflightdeck
Posts: 16
iconQuote:

Q: 1. What is the Problem on the Release Macro ? In your video i see you already use "keysend" for the release instead of "Lua Macro" in the Mobiflight Tab.
Is THERE the Lua Macro not available ??? Or do you just use Key cause it won´t work.


A: I could not get the L-Var to work so I resorted to a mouse macro in FSUIPC.

iconQuote:

So simple test.... Set for Press and release your macros ( with different 3/13 numbers) ..... But now Press the button..... Wait 5 seconds and then release the button.
Does it work now ??? If yes then the momentary usage ( press and release within a part of a second) is to fast to transmit 2 different macros.


I tested as you requested: I waited for over 60 seconds and it would not release. Since the button was still pressed in, I decided to edited the original macro and changed it to 13 and press the button again. It still did not release the button. It is almost like the first macro is running and the second just will not fire. Very strange.


iconQuote:

Another idea..... Are you still advanced with creating and using macros ??
As i know you can include multiple actions within one macro..... If you just need the release of the virtua Button ( and this release not occure in a other action) then maby you can include in your macro a second line that make the release directly behind the push.
So mobiflight just trigger ONE Macro..... And this will press and release the virtual button in one sequence.


I tried this and it did not work. It is possible it had something to do with my syntax. Below is the macro I created. Under it is the command I placed in MF to fire off the macro "On Press"

[Macros]
1=dh_mda_btn
1.1=RX10268,3
1.2=RX10268,13

------
I placed the below command in the "On Press" but it still did not work. I tried a few variations based on some online searches but had no success. If you have an alternative comment that can process the macro for the on off or release the button, I am more than happy adding it to the macro file.

dh_mda_btn:dh_mda_btn:1.1

------
I also tried this format:
[Macros]
1=dh_mda_btn=RX10268,3
2=dh_mda_btn2=RX10268,13

And then set the Press to fire "dh_mda_btn:dh_mda_btn" and Release to fire "dh_mda_btn:dh_mda_btn2"
This also did not work.

I am not sure if I placed it in correctly. If you can verify this, I can try a new method of entering it into MF and see what happens.

For matter of resource I have listed the mouse identifiers below for FSUIPC:
<mouseflag> part provides the actual mouse action required to operate the facility. This is encoded as a number, one
of those listed below:
1 Right single click
2 Middle single click`
3 Left single click
4 Right double click
5 Middle double click
6 Left double click
7 Right button & drag
8 Middlebutton & drag
9 Left button & drag
10 Move
11 Right elease
12 Middle release
13 Left release
14 Wheel up
15 Wheel down
16 Leave
17 Count
[Last edited by myflightdeck, 2020-01-02 00:47]
2020-01-01 23:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
I´m Sorry.

As i said... I not use Macros and Lua Stuff myself.... I simply choose for a AddOn aircraft that is compatible with FSUIPC..... So i not need Macros.
Means.... My Recomendation was "ideas" how it would be logical to me. Not a guide how it works.

Maby somebody here will reply who have more experience..... If Not you should request for help at Pete Dowsons Support Forum.
He basicly programm the "Lua Communication Offsets in FSUIPC" that are used by mobiflight to fire Macros.
He also know Lua Itself 100% and be able to create every macro that is possible.
I recommend to ask him.... Get sure to explane your situation 100% correctly.... Then he pretty sure will guide you.
Good Luck !
2020-01-02 13:07
Avatar
myflightdeck
Posts: 16
Thank you for the advice, I already reached out to him and Wrote the macro according to his example. So the code is written correctly but mob flight controller is not working on the assignment of the macro on release.

You're on release function does not fire off the secondary macro this is still an issue that needs to be addressed can you please get with your team and verify my findings and instruct me on where to go from here?
2020-01-03 00:12
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
Apollogy for your Trouble and thank your for your research work.

Here Sebastian is your man.... Cause Stephan and myself not work with Macros till now.

Hopfully he can solve this..... But you should give him some time. Instead of 98% of other Mobiflight Features the Lua PlugIn (also the Vjoy script and the Encoder-Resolution settings) are NOT from himself. This is code from other users he just implement but not create himself.

So pretty sure he need at first check this element and must understand the logic by testing.

My current ideas about the Problem:

1. A Issue in the Code .... So there is a real Problem that need to be fixed.
2. A basic problem in the FSUIPC Offsets we use for "transfer" the Command. Maby that Offsets need a "reset" by a other command to allow a new input
3. Wrong Syntax by yourself. I not test the PlugIn myself.... Maby it is needed to use a sepcial Parameter or command here.
Good Luck !
2020-01-03 04:56
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1441
Hi there... i just looked at the code in it looks like the Macro should work on either event.

Can you please turn on Settings > Logging > Debug and check the output in the log panel?
There should be an entry each time the Macro Action is triggered:

LuaMacoInputAction:Execute : Calling macro MacroName)

If you see that in there then we know that it is a problem on the FSUIPC side or how the macro code itself works.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2020-01-03 05:16
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
LOL :D :P

Written at 4.56

iconpizman82:


Hopfully he can solve this..... But you should give him some time.
So pretty sure he need at first check this element and must understand the logic by testing.



Written at 5.16

iconDocMoebiuz:

Hi there... i just looked at the code in it looks like the Macro should work on either event.



Looks like "some time" is sometimes just 20 minutes. ;)
Good Luck !
2020-01-03 13:57
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1441
B)
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2020-01-04 00:42
icon