Jump to content
The simFlight Network Forums

Recommended Posts

Hi,

I have FSUIPC Version 5.1.3.1 and P3D Version 4.2.21.24048.

Whenever I try to create a mouse macro and then try to add more actions to it later, the macro file disappears from the "Control sent when button sent" list of available commands.

I can assign multiple functions if I make ALL the assignments in the same macro at the same time, but adding to that macro later makes it disappear.

This is obviously inflexible if you later want to add more functions to it.

Ideally I would want one macro file per aircraft.

Also, If I record a mouse macro to move the same switch to its second position which requires two clicks (in this case the Battery switch in the Aerosoft F16) I do this by clicking the switch once and typing the name, then I click it again and type the same name.  I get this macro file below, but the file does not appear in the list.

[Macros]
1=
1.1=RX1017e,3
1.2=RX1017e,3

 

Peter

 

Edited by zap737

Share this post


Link to post
Share on other sites

Sorry, but I cannot reproduce this. Here it is working fine -- I just tried it. 

You can "Start macro making", give the same name as a previous MCRO file, and OK out, create the macros (with new names, of course), and go back and "end macro making", and the ones you just made are added the the earlier ones.

The code for this mechanism hasn't been changed since it was first implemented in FSUIPC4.  The only changes for P3D4, apart from the 64-bit from 32-bit conversion, were:
1) re-code to use SimConnect windows for the text display when creating (previously they were via hooks direct into the display module), and
2) detect the mouse usage via the P3D4 PDK and encode the returns that provides.

Neither area really impinges onto the file creation and updating itself, which is why I just tested that again myself.

Maybe if you have a reproducible sequence of keypresses which do this, you could ennumerate them please -- using a default aircraft please? i don't have add-on ircraft.

Pete

 

Share this post


Link to post
Share on other sites

Hi Pete, I agree that the actions are being added to the macro file and that the macro file exists in the Modules folder and that the FSUIPC.INI file is indeed updated to list the macro file.

But the problem is that it is not selectable when you want to assign it to a button on your controller.  It is simply not in the list.

Have you tried to subsequently assign the macro file to a switch?  Does it appear in the list?

Here is an example with which you should be familiar.

The default Beech King Air 350.

I select Buttons and Switches-->Create Mouse Macro-->Name it King-->OK-->click on Warning Light in cockpit-->test with TAB-->name it Warning-->Hit Enter on keyboard->back to FSUIPC-->End Macro recording.

Now, when I go to assign Warning to a switch on my controller, the Macro  IS THERE  in the list.

Now I want to add a different cockpit action to the same macro file, for example add clicking the Caution light.

I select Buttons and Switches-->Create Mouse Macro-->Name it King-->OK-->click on Caution Light in cockpit-->test with TAB-->name it Caution-->Hit Enter on keyboard->back to FSUIPC-->End Macro recording.

Now, when I go to assign Warning or Caution to a switch on my controller, the Macro  IS NOT THERE  in the list.  It has disappeared from the list.

Now in the modules folder, the macro file does exist, and it has both the Warning and Caution actions in it and is in the .INI file as well, but it cannot be selected in the "Control sent when button sent" list of available commands because it does not appear in the list, even if I shut down Prepared and restart it.

Here are the contents of the King macro file....

[Macros]
1=Warning=RX0,3
2=Caution=RX2003e,3

 

Second, associated problem

As a corollary to this problem, if I want to create a macro that does multiple actions with a single switch action on the controller, I cannot get it to work either..

Take the same King Air with engines shut down.

I want to turn the battery switch on and turn on the avionics master with both actions assigned to one switch.  In this case I will create a new macro file called Test.

I select Buttons and Switches-->Create Mouse Macro-->Name it Test-->OK-->click on Battery switch in cockpit-->test with TAB-->name it PWR-->Hit Enter on keyboard->click on Avionics master in cockpit-->test with TAB-->name it PWR-->Hit Enter on keyboard->back to FSUIPC-->End Macro recording.

I have named both actions the same (PWR) because I want both actions assignable to one switch.

Again, the macro is not in the list.

But the macro is in the modules folder and looks like this below.

The obvious problem here is that the commands are exactly the same for different switches even though they will have different commands if you create each action individually.

[Macros]
1=
1.1=RX10013,3
1.2=RX10013,3

So how do I create a mutli action macro?

 

Edited by zap737

Share this post


Link to post
Share on other sites
8 hours ago, zap737 said:

But the problem is that it is not selectable when you want to assign it to a button on your controller.  It is simply not in the list.

Ah, I didn't understand that from your last message. There's a rescan missing. I'll test it, and if I can reproduce it I'll insert a rescan -- i.e. the same as pressing the "reload" button on the FSUIPC screen you are using to "end macro making". (That should be your workaround for now, whilst i check).

8 hours ago, zap737 said:

But the macro is in the modules folder and looks like this below.

The obvious problem here is that the commands are exactly the same for different switches even though they will have different commands if you create each action individually.

[Macros]
1=
1.1=RX10013,3
1.2=RX10013,3

Er ... so it is recording just ONE macro with no name and performing the same action twice. Which is very wird, because I assigned several actions to several buttons or switches on the cockpit, giving each one a different name, and they came out file in the file. 

8 hours ago, zap737 said:

I select Buttons and Switches-->Create Mouse Macro-->Name it Test-->OK-->click on Battery switch in cockpit-->test with TAB-->name it PWR-->Hit Enter on keyboard->click on Avionics master in cockpit-->test with TAB-->name it PWR-->Hit Enter on keyboard->back to FSUIPC-->End Macro recording.

Aha! I see you used the same name for each action, which explains why there are two entries for the same macro, but the name being missing is a puzzle, as is the reason for the two entries being the same.

I'll try to reproduce this here and see what is going on. Thanks for the clarification.

BTW did you make these sorts of macros for FSUIPC4 (FSX or P3D3) at all?

Pete

 

Share this post


Link to post
Share on other sites
2 hours ago, Pete Dowson said:

i.e. the same as pressing the "reload" button on the FSUIPC screen you are using to "end macro making". (That should be your workaround for now, whilst i check).

Sorry Pete, not quite clear here.  What should I be doing for a workaround?   If it is pressing the "Reload all buttons" after I have "end macro making", I have tried that and the macro is still missing from the list.

2 hours ago, Pete Dowson said:

Aha! I see you used the same name for each action, which explains why there are two entries for the same macro, but the name being missing is a puzzle, as is the reason for the two entries being the same.

Yes, it was the only way I could think of getting two different actions into a multi line mouse macro.

2 hours ago, Pete Dowson said:

BTW did you make these sorts of macros for FSUIPC4 (FSX or P3D3) at all? 

I definitely used them in P3D3 and FSUIPC 4.  I don't have P3D3 installed any more.

Edited by zap737

Share this post


Link to post
Share on other sites
3 hours ago, zap737 said:

Sorry Pete, not quite clear here.  What should I be doing for a workaround?   If it is pressing the "Reload all buttons" after I have "end macro making", I have tried that and the macro is still missing from the list.

If the macrofile is faulty like the one you showed, it won't load.  Sorry, i wasn't clear. A good macrofile will load automatically without having to press reload, as soon as you press End Macro aking. I have proven that here.

I have reproduced similar problems here and i am in the process of fixing them.

3 hours ago, zap737 said:

it was the only way I could think of getting two different actions into a multi line mouse macro.

Yes, and it should work fine, as documented. All this is one bug in fact, in multi-action macros. I'm working on it.

3 hours ago, zap737 said:

I definitely used them in P3D3 and FSUIPC 4. 

Odd, because the code in this area in the same, so it should have the exact same bugs with multi-action macros. I'll test that when I've fixed FSUIPC5, because i think I'll need to put the same fixes in FSUIPC4.

Once you have a good multi-action macro definition it works okay. It is only a problem with the automatic creation. I think users must have made them manually, editing the Macro files (which is a relatively easy job -- easier than button programming for sure).

I won't be through here till tomorrow. It is more complicated than I expected. Either that or my brain is failing with old age.

Pete

 

Share this post


Link to post
Share on other sites
3 hours ago, Pete Dowson said:

I won't be through here till tomorrow. It is more complicated than I expected. Either that or my brain is failing with old age.

Okay. I've fixed it. It was a bit complicated. It'll be fixed in the next update. Please look out for it, quite soon I think.

I really do need to verify what is happening in FSUIPC4 with rather similar code, because it looks like that should have the same problem. But I only have a default install of FSX-SE, and I cannot find any mouse-macro usable cockpit switches in any of the default aircraft. Do know of any? Can you remember, or did you only use Mouse Macros with add-on aircraft?

Pete

 

Share this post


Link to post
Share on other sites

 

OK, glad you confirmed there was in fact an issue as i thought I was going slightly mad !!!

 

10 hours ago, Pete Dowson said:

Do know of any? Can you remember, or did you only use Mouse Macros with add-on aircraft?

The aircraft I used them on was the F-16 in P3D3.  Now this is a "default" aircraft that comes with P3D out of the box, it is not an add-on per se.

It is, in fact, an Aerosoft F-16 under the hood.

So, is it a default aircraft or an add-on?  I don't really know.

Anyway, I was trying to discover what switches I could map by using mouse macros and they worked in P3D3 with the F-16.

What is strange is that it uses Lvars and I made some macros using Lvars and for some switches the Lvars worked but for others, they didn't !

For example the Lvars for the speed brake are present and are being set by the underlying code, but when I tried to set them using a macro, the speed brake doesn't move even though I am setting the same parameter that the underlying code is using.

I have also tried to write to the speed brake Lvar using LUA script but that has no effect.

 

Quote

It'll be fixed in the next update. Please look out for it, quite soon I think. 

Fantastic news

 

13 hours ago, Pete Dowson said:

Either that or my brain is failing with old age. 

There is absolutely nothing wrong with your brain Peter.

Regards,

Another Peter

Edited by zap737

Share this post


Link to post
Share on other sites
6 hours ago, zap737 said:

So, is it a default aircraft or an add-on?

I don't think it's a default for FSX.

6 hours ago, zap737 said:

What is strange is that it uses Lvars and I made some macros using Lvars and for some switches the Lvars worked but for others, they didn't !

Sometims the gauge code uses L:Vars (local variables) as a record of switch or other setting for other parts of the add-on to refer to, NOT as an actuator for them.

Pete

 

 

Share this post


Link to post
Share on other sites
13 minutes ago, Pete Dowson said:

Sometims the gauge code uses L:Vars (local variables) as a record of switch or other setting for other parts of the add-on to refer to, NOT as an actuator for them.

Ok, that would explain it, for the speedbrake, but I could definitely actuate other switches in the F-16 using Lvar.write commands run from a LUA script.

Strange they would aloow some to be set and some not.

Share this post


Link to post
Share on other sites
2 hours ago, zap737 said:

Strange they would aloow some to be set and some not.

True. Maybe there's another, one with a name you didn't recognise? Have you tried using the Lua plug-in which displays the L:Vars as they change? Use that whilst operating the speedbrake with the mouse.

Pete

 

Share this post


Link to post
Share on other sites
1 hour ago, Pete Dowson said:

Maybe there's another, one with a name you didn't recognise? Have you tried using the Lua plug-in which displays the L:Vars as they change? Use that whilst operating the speedbrake with the mouse.

Yes I did that with the LUA plugin via FSUIPC and LINDA.  When I actuated the speed brake with the mouse the only Lvar which changed was L:SPEED_BRAKE_POS.

Yet I successfully mapped the engine throttle idle/cutoff using the same procedure and a LUA script !

Could it be seeing it as an axis?  The values for L:SPEED_BRAKE_POS change continuously from 0 to 100 e.g.      0, 20.12, 50.48, 80.47 etc.up to 100

It is definitely not mapped as an axis in FSUIPC.

 

Share this post


Link to post
Share on other sites
7 minutes ago, zap737 said:

Could it be seeing it as an axis?  The values for L:SPEED_BRAKE_POS change continuously from 0 to 100 e.g.      0, 20.12, 50.48, 80.47 etc.up to 100

The speed brake (= spoiler) IS an axis in P3D, as it was in FSX. Are you sure your aircraft isn't using the normal built-in axis? Try assigning in FSUIPC.  For fixed positions you can use a button with the Axis spoiler set control and the relevant value (which will be 0-16384, not a percentage).  Otherwise there's Spoilers arm off, on , set and toggle, and Spoilers off, on, set and toggle.

I'm only familiar with airliners -- then it's normally an axis with four special positions -- down, armed, flight and spoiler, with the last being the fully up action to keep the aircraft on the ground after landing and help with braking. Do you a parachute for that in an F-16? 😉

Pete

 

Share this post


Link to post
Share on other sites
21 minutes ago, Pete Dowson said:

Are you sure your aircraft isn't using the normal built-in axis? Try assigning in FSUIPC.

I have disabled the controllers in P3D and have assigned the Joystick and throttle axes only through FSUIPC.  I will play around with the spoiler axis assignment.

 

21 minutes ago, Pete Dowson said:

I'm only familiar with airliners -- then it's normally an axis with four special positions -- down, armed, flight and spoiler, with the last being the fully up action to keep the aircraft on the ground after landing and help with braking. Do you a parachute for that in an F-16? 😉

It's funny, but I fly 737s for a living and have flown them for 22 years !  So I am quite familiar with the spoiler functions !

I have also flown fast jets in my RAAF days and no, I never flew a jet without and ejection seat, although I am relieved I never had to get my official "Martin-Baker Pin".

Share this post


Link to post
Share on other sites
27 minutes ago, zap737 said:

It's funny, but I fly 737s for a living and have flown them for 22 years !  So I am quite familiar with the spoiler functions !

Oh, sorry. I didn't know.

28 minutes ago, zap737 said:

I have also flown fast jets in my RAAF days and no, I never flew a jet without and ejection seat, although I am relieved I never had to get my official "Martin-Baker Pin".

😉

Pete

 

Share this post


Link to post
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

×

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.