• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

@1 prefix, Macros

Dietmar

Resource contributor
Messages
198
Country
germany
Hi, can somebody pls tell me, what the prefix @1 and @2 in this XML string means ??

<Macro Name="InvokeMenu">
@1 (>@g:Menu1) @2 (>@g:Menu2) ....

Thanks

Dietmar
 
Last edited:
Good idea. I remember that confusing the hell out of me when I first saw it... But then it dawned on me that it's just like calling a function in a real programming language!:)
 
Ha! When I first started mentally parsing the default G500 script to suss out the actual logic and operations, all those bloody @1, @2, @3 "things" drove me to tears... :rotfl:
 
Hi,
just another prefix I don't understand is "1 d" and "2 d" in the following string:

1 d (>C:ITrafficInfo:CurrentVehicle,enum) (>C:ITrafficInfo:SelectedVehicle,enum) .................


2 d (>C:ITrafficInfo:CurrentVehicle,enum) (>C:ITrafficInfo:SelectedVehicle,enum) .....................

With the first string (1 d) I get the info for a AI plane ID XX and with the second string ( 2 d) I get the info for AI plane XY.

With no prefix I get two times the info for plane XX. So, the prefix provides me the info for different AI planes e.g. "3 d" provides me the info for
plane YY and so on. What does the 1 d, 2 d, or 3 d do ???
All what I see, it works but what does the magic prefix select ??

Dietmar
 
The "d" following the number is a "stack operator," and simply "d(uplicates)" the number on the stack.

d Duplicates the value that is on the top of the stack
stack: 5 d
stack: 5 5

When preceding a set of "commands," the numbers on the stack are "fed" to the "commands" in sequence.

In summary, the following are equivalent expressions:

Code:
2 (>C:ITrafficInfo:CurrentVehicle,enum) 2 (>C:ITrafficInfo:SelectedVehicle,enum)

2 d (>C:ITrafficInfo:CurrentVehicle,enum) (>C:ITrafficInfo:SelectedVehicle,enum)
 
Bill,
thanks a lot for your quick reply and the info. With your help, I meanwhile understand at least why this things are working.

Regards
Dietmar
 
Back
Top