Jump to content
The simFlight Network Forums

Assign macro to a button


3greens

Recommended Posts

I think I have read everything on this subject but I still need help.

I have created a cj4.mcro file with the following contents:

[Macros]
1=H:Generic_Upr_RANGE_DEC=Set
2=H:Generic_Upr_RANGE_INC=Set
3=H:WT_CJ4_AP_NAV_PRESSED=Set
4=H:WT_CJ4_AP_VNAV_PRESSED=Set
5=H:WT_CJ4_AP_MASTER_ON=Set
6=CJ4:load_FP
6.1=H:CJ4_FMC_1_BTN_IDX
6.2=H:CJ4_FMC_1_BTN_NEXTPAGE
6.3=H:CJ4_FMC_1_BTN_R1
6.4=H:CJ4_FMC_1_BTN_L3

There is a CJ4.hvar file in the  ...\work folder with all those hvars listed.

I can activate the individual Hvars using the WASM tool tab and they show up in the scrolldown assignment list but macro #6 never appears on that scrolldown menu.  It does not matter if the "a/c specific" case is ticked or not.  I have tried to include the #6 macro in its own dedicated  citation.mcro file with no success.  Both MacroFiles entries have been created in the .ini file.

I must be missing something obvious but right now it's obvious to everybody but me...

I have attached the latest WASM log

Thanks for your help!

FSUIPC_WASM.log

Link to comment
Share on other sites

9 hours ago, 3greens said:

6=CJ4:load_FP
6.1=H:CJ4_FMC_1_BTN_IDX
6.2=H:CJ4_FMC_1_BTN_NEXTPAGE
6.3=H:CJ4_FMC_1_BTN_R1
6.4=H:CJ4_FMC_1_BTN_L3

You cannot do this. Although its not clear from the documentation (I will update), hvars multi-line macros have the same restriction as lvar multi-line macros:

Quote

The multi-line macro format can still be used with the Lvar macros, as follows:
36
N=L:name
N.1=action1
N.2=action2
... etc.
However, unlike the usual multi-line macros, those using an L:Var cannot be mixed with any other parameter types or other L:Vars.
The single L:Var identifier is the actual macro name as well, so this prevents such complexity.

 

As the only action on hvars is Set, multi-line hvar macros don't make sense. I will make this clear in the documentation.

To trigger multiple macros, you have two options:

1. Use multiple assignments
Define each hvar as a set macro. Then assign those macros to the same button. To do this, you need to assign to the first macro, then comment out that assignment (in your FSUIPC7.ini file), reload your asignments, then assign to the next macro. Repeat until all assigned, then uncomment those macro assignments that you previously commented-out.

2, Use the new preset mechanism, introduced in the latest release, v7.2.16.
To use this method, create a file call myevents.txt in your FSUIPC7 installation folder. In that file, add this line:
     CJ4:load_FP# (>H:CJ4_FMC_1_BTN_IDX) (>H:CJ4_FMC_1_BTN_NEXTPAGE) (>H:CJ4_FMC_1_BTN_R1) (>H:CJ4_FMC_1_BTN_L3)
You should then see this in the controls drop-down menus as Preset: CJ4:load_FP.
Note also that using this method, you do not need to make the hvars known to FSUIPC7 via the *.hvar files, although this does no harm.

 

John

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.