• 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.

ATC window status/events

Messages
1
Country
unitedkingdom
Hello,

I am trying to write a little bit of SimConnect code that does the following.

1. Detect that the ATC window has been made visible by FSX's built-in ATC (happens whenever new ATC messages come in)

2. Obtains the current simulation rate

3. Sets the current simulation rate to 1x

4. Pauses the simulation

Items 2., 3. and 4. seem relatively trivial. Does anybody have any idea how to accomplish 1.? I have tried to subscribe to event "KEY_ATC", but that only fires if the window is activated by the user by pressing the ATC hotkey, but not if the window is activated by the simulator as new ATC messages come in.

To give you some additional context of what I am trying to achieve: I have the issue that when I am doing long-haul flights under IFR rules with increased simulation rates (unfortunately I don't have the time to fly these in real-time), ATC expects responses with increased rate as well (unfortunately I can't increase my own body's 'simulation rate' :) ), so if I am not paying attention and reset the simulation rate instantaneously after an ATC message has come in, the air traffic controllers get aggravated and eventually cancel my IFR plan.

I would therefore like my bit of code to detect that a new ATC message has come in, immediately reset the simulation rate to normal, and optionally pause the simulation, giving me time to react to the message, after which I can then increase the simulation rate again.

I thought I would be able to detect incoming ATC messages through the state of the ATC window. I can manually close the ATC window myself before going to increase simulation rate. If a new ATC message comes in, the window pops up again automatically, so I thought I would somehow be able to detect that in my SimConnect code and react to the event, but I don't seem to be able to find any hints on how to detect state changes of the ATC window.

Does anybody know how to achieve this? I have the fleeting suspicion that you are going to say that this is not possible, but any help would be greatly appreciated!
 
Back
Top