Jump to content
Sign in to follow this  
FlyingsCool

Help with Macro notation

Recommended Posts

I'm having some trouble getting some macros to work 01518%(@MP_Max @MP_Min - @MP_NumBars /)But when I try to use it, the result is 0. 105.000,107.000#101010Digital Readout40%((A:ENG MANIFOLD PRESSURE:1,psi) (@MP_Div) /)%!4.1f!90,46TrueCENTERThomas[a href=http://www.flyingscool.com] http://www.flyingscool.com/images/Signature.jpg [/a]I like using VC's :-)N15802 KASH '73 Piper Cherokee Challenger 180


Tom Perry

 

Signature.jpg

Share this post


Link to post
Share on other sites

Not sure, try:@MP_Max @MP_Min - @MP_NumBars /and %((A:ENG MANIFOLD PRESSURE:1,psi) @MP_Div /)%!4.1f!Jan

Share this post


Link to post
Share on other sites

I've tried both of those changes with the same result. If I don't put parentheses around the @MP_Div in the script, the ACES.exe program gives me a warning telling me no commands are longer than 4 characters. And I've also tried the macro definition you suggest, and the expression using it still returns 0.Thomas[a href=http://www.flyingscool.com] http://www.flyingscool.com/images/Signature.jpg [/a]I like using VC's :-)N15802 KASH '73 Piper Cherokee Challenger 180


Tom Perry

 

Signature.jpg

Share this post


Link to post
Share on other sites

Did you try both together?01518@MP_Max @MP_Min - @MP_NumBars /@MP-Div should give (15 - 0) / 18 = 5/6So the code for the string is:%((A:ENG MANIFOLD PRESSURE:1,psi) 5/6 /)%!4.1f!or%((A:ENG MANIFOLD PRESSURE:1,psi) @MP_Div /)%!4.1f!in code:%((A:ENG MANIFOLD PRESSURE:1,psi) 5 * 6 / /)%!4.1f!or%((A:ENG MANIFOLD PRESSURE:1,psi) 6 * 5 /)%!4.1f!I am not familiar with ACES.exe;may be the program means that the quotient is more than 4 characters, as it is, 0,8333333333 etc. etc.Btw. I tested all and it works(FS9)Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

If you are using FSX new syntax for XML, as to edit the gauge with ACE editor, you need to write it like:0and so on.And, in your example:("MP_Div" macro)...@MP_Max @MP_Min - @MP_NumBars /then%((A:ENG MANIFOLD PRESSURE:1,psi) @MP_Div /)%!4.1f!TomAnd yes, FSX SDK erroneously refers macro expressions with the old syntax...

Share this post


Link to post
Share on other sites

Yes, putting numbers in works fine. But, given that I'd like to use this gauge for different aircraft, I'm trying to set up some macros at the top of the gauge so it can be individualized for different uses (eventually I'd like to have it read the values from an external .ini file, but I'll work on that later).I think my problem is finding the right combination of parentheses and percent signs, etc.. I just can't figure out the correct syntax to get it to work.The ACES.exe program is in the Panels and Gauges directory of the SDK. It is pretty helpful for laying out a gauge and checking the syntax. I do most of my editing in a text editor, but this is handy for checking the gauge and laying it out (and it was useful for learning some gauge concepts, too). Thomas[a href=http://www.flyingscool.com] http://www.flyingscool.com/images/Signature.jpg [/a]I like using VC's :-)N15802 KASH '73 Piper Cherokee Challenger 180


Tom Perry

 

Signature.jpg

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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...