Jump to content
The simFlight Network Forums

Create macro for L-var manipulation


Recommended Posts

Hi,

 

I am trying to write a macro for the default A 321 radio panel. With the mouse you can change the display to show com1, com2, nav, etc. by pressing the appropriate button. I want to assign that to a key.

 

I have tried to create a mouse macro, but the action wasn't recorded (no multiline message upon press).

 

From what I understand so far (and I found out the name of the L-var in the gauge) I created this "a321.MCRO" file in the modules folder:

[Macros]
Module="popup_radio.xml"
1=com1=L:COM 1 Pressed,tog

However, the macro "a321" was not listed in the drop-down menu for key assignment.

 

Any help is much appreciated.

Link to comment
Share on other sites

I have tried to create a mouse macro, but the action wasn't recorded (no multiline message upon press).

 

Very few gauge actions in the default aircraft are susceptible to this method.

 

From what I understand so far (and I found out the name of the L-var in the gauge) I created this "a321.MCRO" file in the modules folder:

[Macros]
Module="popup_radio.xml"
1=com1=L:COM 1 Pressed,tog

However, the macro "a321" was not listed in the drop-down menu for key assignment.

 

 

The format is not correct. Please check "Macros to change Lvars" on about page 40 of the Advanced User's guide: there is no separate name, the L:var name IS the name.

 

Where the name is too long (and this one is close, but I think should fit) you'd need to write the action as a short Lua plug-in instead, and invoke that by assignment instead.

Pete

Link to comment
Share on other sites

Thanks Pete, it seems I mixed something up. I had the wrong Lvar, too.
 
It works like this, where the set number represents com1, com2, etc. :

[Macros]
Module="popup_radio.xml"      //the default A321 radio gauge
1=L:Radio Tune Select=Set,1   //set the display to com 2 frequency

Edit: One minor thing: adding several actions for use with different keys all show the same name in the dropdown.
 

1=L:Radio Tune Select=Set,1
2=L:Radio Tune Select=Set,2 

Both show as "a321:L:Radio Tune Select". Is there a workaround?

Link to comment
Share on other sites

Edit: One minor thing: adding several actions for use with different keys all show the same name in the dropdown.

1=L:Radio Tune Select=Set,1
2=L:Radio Tune Select=Set,2 

Both show as "a321:L:Radio Tune Select". Is there a workaround?

 

Leave off the ,1 and ,2 and supply that as the parameter in your assignment.

 

Pete

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.