Jump to content
The simFlight Network Forums

Macro Questions


Recommended Posts

I put together a little Macro test file MacroTest.mcro that looks like this:

[Macros]

1=L:PITOT_L=SET,0
2=L:PITOT_R=SET,0
3=L:PITOT_L=SET,1
4=L:PITOT_R=SET,1

In the resultant FSUIPC6 Key Assignment dropdown list, the 0 and 1 SET values do not show up, so the dropdown has what looks like duplicate entries. That seems confusing, am I doing something wrong?  I had expected the actual SET values associated with each line in the Macro file to show up in the dropdown list to facilitate the key assignment process.  

For SET, the FSUIPC user manual says:

Set copies the parameter in the Macro invocation to the identified Lvar. Alternatively, a value can be given explicitly here, by “Set,n”.

It is not clear to me what is meant by "Macro invocation" -- is this referring to the Parameter field associated with the dropdown list? If you do have to enter the desired SET value in the Parameter field, what is the utility of using SET, n in the Macro file?

Thanks,

Al

 

 

 

 

 

Link to comment
Share on other sites

  • John Dowson changed the title to Macro Questions
4 hours ago, ark1320 said:

1=L:PITOT_L=SET,0
2=L:PITOT_R=SET,0
3=L:PITOT_L=SET,1
4=L:PITOT_R=SET,1

In the resultant FSUIPC6 Key Assignment dropdown list, the 0 and 1 SET values do not show up, so the dropdown has what looks like duplicate entries. That seems confusing, am I doing something wrong?

As the lvar name is the macro entry name, you should not have the same lvar more than once on a macro, especially if using the same action.

4 hours ago, ark1320 said:

I had expected the actual SET values associated with each line in the Macro file to show up in the dropdown list to facilitate the key assignment process.  

No, the set values have never appeared in the drop down list. Its usually just the name which should be sufficient for you to identify the action, but in the case of single lvar macros the action is also appended to the lvar name.

4 hours ago, ark1320 said:

Set copies the parameter in the Macro invocation to the identified Lvar. Alternatively, a value can be given explicitly here, by “Set,n”.

It is not clear to me what is meant by "Macro invocation" -- is this referring to the Parameter field associated with the dropdown list? If you do have to enter the desired SET value in the Parameter field, what is the utility of using SET, n in the Macro file?

"Macro invocation" just means when the macro is ran, so when you run the macro, the parameter is copied to the lvar (or, in other words, used to set the lvar). It refers to the parameter however it is supplied, in the macro file or in the assignment.
You can do things either way, but better to leave the parameter off in the macro file and just set the parameter in your assignment, i.e. just use:

[Macros]
1=L:PITOT_L=SET
2=L:PITOT_R=SET

- and you must do it this way if using the same lvar and action with different parameters, otherwise there is no way to distinguish the different entries.

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.