Sign in to follow this  
Guest kwiddler

Using SimConnect to End Flight

Recommended Posts

Hello,I'm having trouble finding a SimConnect event (or simulation variable) to help me perform the same operation, from my SimConnect client, as the "Esc" key, aka "End Flight". (This would normally return one to the main FSX dialog.) I've been able to "Exit", and to "Reset Flight", but not "End Flight". What am I missing? Or is it even possible??KimPS: In a desperate attempt for an alternative strategy, I wanted to try sending the "Esc" key to the appropriate FSX Window entity via SendMessage(), but no luck here neither. Does anyone know if one can get their tentacles into the FSX input event loop like this? I tried using Spy++ to find the appropriate Window, but failed.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

> I'm having trouble finding a SimConnect event (or simulation > variable) to help me perform the same operation, from my SimConnect > client, as the "Esc" keyIt's the Sim Event "USER_INTERRUPT", as you can see from the default keyboard assignments (the "Standard.XML" file in the Controls subfolder of the FSX App Data -- where the FSX.CFG file is).> wanted to try sending the "Esc" key to the appropriate FSX>Window entity via SendMessage(), but no luck here neither.>Does anyone know if one can get their tentacles into the FSX>input event loop like this? I tried using Spy++ to find the>appropriate Window, but failed.The window is the top-level one with Classname "FS98MAIN". You would have to send key down and key up messages to get the ESC recognised. But of course the user may have re-assigned the key -- best to use the control instead.RegardsPete

Share this post


Link to post
Share on other sites

Pete, thank you very much! This Standard.XML file is indeed a wealth of information. It just goes to show I should have more thoroughly explored the entire file tree under FSX. (Although fsx.cfg and Standard.XML are a little separated from the "main" tree.)The USER_INTERRUPT event thrown into TransmitClientEvent does exactly as one might think - brings one immediately to the END MISSION fsx dialog.So I wonder why USER_INTERRUPT is not mentioned anywhere, except Standard.XML? (I used File Search to verify that.) I wonder if the SimConnect SDK just overlooked it? And how many others? Clearly I should be looking more at your own work concerning the FSX interfaces.So now I am back to the harder job of trying to control the built-in FSX dialogs from my joystick and its buttons. Again, I know I should be reading the FSUIPC stuff (I wish SimConnect was enough), but I will first experiment for a few hours with trying to send messages to the FS98MAIN window. Yesterday with Spy++ I did not note any keyboard messages (like the "p" for pause) making it through to FS98MAIN, but the experiment you describe is worth a try.Thanks again! I'm really happy to have Standard.XML added to my FSX developer's documentation.Kim

Share this post


Link to post
Share on other sites

>I wonder why USER_INTERRUPT is not mentioned anywhere,>except Standard.XML?Are all the possible Sim Events documented? I don't think so. In fact I don't think they ever were. I've always taken it upon myself to list them all -- my "Lists of FS Controls" has been going since FS2000. the one for FSX is actually installed into the FSX Modules folder when you install FSUIPC4.Note that what I've always called FS Controls (because they are tabulated in FS's CONTROLS.DLL) are the same as what Gauge-makers see as "Key Events" (listed in Gauges.h) and now, with SimConnect, have become known as "Sim Events". They all seem to result in WM_COMMAND messages being sent to FS98MAIN with the "control number" as the first parameter -- Axis Controls ("SET"s) have the axis value as second, though in FSX this looks a little less consistent.The User Interrupt one has been standard now ever since I can recall -- FS98 certainly, probably FS95.Take care though. Just because I list them (from the tables in CONTROLS.DLL) doesn't mean they all work -- some are not 'hooked up' in the code, either because they were discontinued or, more usually I think, they were never implemented (or never worked). Some are misnamed too and don't actually do quite what they imply.If you have a registered FSUIPC you can try any of the listed controls by assigning them to keys or joystick buttons.RegardsPete

Share this post


Link to post
Share on other sites

Kim - I'm curious what after the flight is ended? I decided early on with my app to create my own interface and then use FSX as as when required. I could see the effort vs benefit of trying to use the interface just was'nt worth it. Don't get me wrong the user still has access to the menu system to fiddle with what ever they want. But my app has overall control. Just a thought.Paul

Share this post


Link to post
Share on other sites

Forgot to mention, I use SHOW_OPENING_SCREEN=0 in FSX to switch all the gloss off.

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