Gents,
I am an amateur at writing xml, so I need a bit of advice. I am attempting to create some code that will automatically set NAV1 to a certain frequency when you get within 1.5nm of a particular airport. Since I have no idea what I am doing, I wrote the following which doesn't appear to be working:
<Macro Name="c">C:fs9gps:1</Macro>
<Element>
<Select>
<Value>
110.30 (>L:NAV1store1,MHz)
((@c:NearestAirportCurrentICAO) NIKE == || (@c:NearestAirportCurrentICAO) NNGW ==) (@c:NearestAirportCurrentDistance, meters) 2778 < &&
if{1, (L:NAV1store1,MHz) 100 * near 10000 % d 10 % r 10 / int d 10% r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET)}
</Value>
</Select>
</Element>
Any advice or suggestions would be most appreciated.
I am an amateur at writing xml, so I need a bit of advice. I am attempting to create some code that will automatically set NAV1 to a certain frequency when you get within 1.5nm of a particular airport. Since I have no idea what I am doing, I wrote the following which doesn't appear to be working:
<Macro Name="c">C:fs9gps:1</Macro>
<Element>
<Select>
<Value>
110.30 (>L:NAV1store1,MHz)
((@c:NearestAirportCurrentICAO) NIKE == || (@c:NearestAirportCurrentICAO) NNGW ==) (@c:NearestAirportCurrentDistance, meters) 2778 < &&
if{1, (L:NAV1store1,MHz) 100 * near 10000 % d 10 % r 10 / int d 10% r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET)}
</Value>
</Select>
</Element>
Any advice or suggestions would be most appreciated.

