Add PMDG 737NGX events to the FSX Events list
Add PMDG 737NGX events to the FSX Events list
Petr, thank you for the great tool!
I'd like to ask if you could add all the PMDG 737NGX events to the existing drop-down list of FSX events? They work exactly the same, just different range of numbers.
All events can be found in the SDK file provided with the aircraft:
<FSX main folder>\PMDG\PMDG 737 NGX\SDK\PMDG_NGX_SDK.h
Or on this website:
http://www.blueskies737.com/737ngx-control-codes/
Right now we need to know the event numbers to use them, for ex. to switch the A/T ARM:
HIDMacros.FSXEvent "#70012", 0
The only requirement (you can put it as a note in documentation) to use those events is to enable PMDG data broadcasting, that is add the following 2 lines to this file: <FSX main folder>\PMDG\PMDG 737 NGX\737NGX_Options.ini
[SDK]
EnableDataBroadcast=1
Thanks in advance,
Michal
I'd like to ask if you could add all the PMDG 737NGX events to the existing drop-down list of FSX events? They work exactly the same, just different range of numbers.
All events can be found in the SDK file provided with the aircraft:
<FSX main folder>\PMDG\PMDG 737 NGX\SDK\PMDG_NGX_SDK.h
Or on this website:
http://www.blueskies737.com/737ngx-control-codes/
Right now we need to know the event numbers to use them, for ex. to switch the A/T ARM:
HIDMacros.FSXEvent "#70012", 0
The only requirement (you can put it as a note in documentation) to use those events is to enable PMDG data broadcasting, that is add the following 2 lines to this file: <FSX main folder>\PMDG\PMDG 737 NGX\737NGX_Options.ini
[SDK]
EnableDataBroadcast=1
Thanks in advance,
Michal
Re: Add PMDG 737NGX events to the FSX Events list
Hi Michal
Thanks for your investigation and tutorial-post, I belive PMDG users will like it .
Regarding events - I'll work on it. Currently events are hardcoded and I think HIDmacros is sending the name - exactly the value available in the list. After quick look I think for PMDG I'll have symbolic name from .h file to be displayed and the hex value to be sent. So I need to change it little bit and probably I'll move the list to some configuration file containing standard FSX events, PMDG and whatever different ones.
I'm currently working on MIDI input (as I found old unused midi keyboard at home ) so I'll try to include this possibility into next beta.
Thanks for your investigation and tutorial-post, I belive PMDG users will like it .
Regarding events - I'll work on it. Currently events are hardcoded and I think HIDmacros is sending the name - exactly the value available in the list. After quick look I think for PMDG I'll have symbolic name from .h file to be displayed and the hex value to be sent. So I need to change it little bit and probably I'll move the list to some configuration file containing standard FSX events, PMDG and whatever different ones.
I'm currently working on MIDI input (as I found old unused midi keyboard at home ) so I'll try to include this possibility into next beta.
Petr Medek
LUAmacros author
LUAmacros author
Re: Add PMDG 737NGX events to the FSX Events list
Petr,
Great to hear that, thanks. Of course I can help with beta testing.
Wow, the MIDI keyboard, I remember those from the early 90's
Great to hear that, thanks. Of course I can help with beta testing.
Wow, the MIDI keyboard, I remember those from the early 90's
Re: Add PMDG 737NGX events to the FSX Events list
Michal,
if you want to help me with beta testing, here's the chance.
Download night build exe from http://www.hidmacros.eu/HIDMacros.exe and replace it in your installation.
New behavior is:
if there's a file named FSXevents.lst in application directory it's used to feed the combo with FSX events. If there's no such file, current behavior with hardcoded standard values is used.
Each line in the file is for one option in combo box. You can even place event name directly, like for standard FSX events, e.g.:
DME_SELECT
Or if you want to have different event code and label in combo (which will be probably case for PMDG) use colon to separate code and caption, e.g.:
NAV1_RADIO_SWAP:Nav 1 radio swap
Find sample file with default FSX events at http://www.hidmacros.eu/FSXevents.lst
You can use it as starting point for your tests.
Hope my explanation is sufficient and these changes will work for you.
P.
if you want to help me with beta testing, here's the chance.
Download night build exe from http://www.hidmacros.eu/HIDMacros.exe and replace it in your installation.
New behavior is:
if there's a file named FSXevents.lst in application directory it's used to feed the combo with FSX events. If there's no such file, current behavior with hardcoded standard values is used.
Each line in the file is for one option in combo box. You can even place event name directly, like for standard FSX events, e.g.:
DME_SELECT
Or if you want to have different event code and label in combo (which will be probably case for PMDG) use colon to separate code and caption, e.g.:
NAV1_RADIO_SWAP:Nav 1 radio swap
Find sample file with default FSX events at http://www.hidmacros.eu/FSXevents.lst
You can use it as starting point for your tests.
Hope my explanation is sufficient and these changes will work for you.
P.
Petr Medek
LUAmacros author
LUAmacros author
Re: Add PMDG 737NGX events to the FSX Events list
Děkuji Petr,
I'll give it a try over the weekend. If everything works well I will send you the .lst file with PMDG events included.
Michal
I'll give it a try over the weekend. If everything works well I will send you the .lst file with PMDG events included.
Michal
Re: Add PMDG 737NGX events to the FSX Events list
Ok, I tried to add the following, but none of them are working:
70010:PMDG_EVT_MCP_FD_SWITCH_L
#70010:PMDG_EVT_MCP_FD_SWITCH_L
"#70010":PMDG_EVT_MCP_FD_SWITCH_L
'#70010':PMDG_EVT_MCP_FD_SWITCH_L
\#70010:PMDG_EVT_MCP_FD_SWITCH_L
"\#70010":PMDG_EVT_MCP_FD_SWITCH_L
Am I missing something here? How do you execute an event in code? Just to remind, the working script is like this:
HIDMacros.FSXEvent "#70010", MOUSE_FLAG_LEFTSINGLE
with double quotes, maybe that's what is missing when you put the event value in the code?
70010:PMDG_EVT_MCP_FD_SWITCH_L
#70010:PMDG_EVT_MCP_FD_SWITCH_L
"#70010":PMDG_EVT_MCP_FD_SWITCH_L
'#70010':PMDG_EVT_MCP_FD_SWITCH_L
\#70010:PMDG_EVT_MCP_FD_SWITCH_L
"\#70010":PMDG_EVT_MCP_FD_SWITCH_L
Am I missing something here? How do you execute an event in code? Just to remind, the working script is like this:
HIDMacros.FSXEvent "#70010", MOUSE_FLAG_LEFTSINGLE
with double quotes, maybe that's what is missing when you put the event value in the code?
Re: Add PMDG 737NGX events to the FSX Events list
Ok, thanks for test.
Not sure now, I'll check tonight.
Not sure now, I'll check tonight.
Petr Medek
LUAmacros author
LUAmacros author
Re: Add PMDG 737NGX events to the FSX Events list
Maybe you could add an "if" when the line in .lst file starts with # you would treat it as a custom event and execute exactly as in my example above, and otherwise treat it like the built in FSX event?
Re: Add PMDG 737NGX events to the FSX Events list
Michal,
what is the exact problem you have? Not having the value in list, or the event doesn't work?
I don't have PMDG so can not do full test, but all seems to work...
I changed the FSXevents.lst file adding as first line:
Then I defined macro with this event (note there's alphabetical sort, so it will be somewhere in the middle) and when it's activated the event is sent to FSX according to debug log:
For your tests you can set debugging for FSX area by launching hidmacros with parameter debug:FSX, so the complete command would be
If the event just doesn't work, you can compare debug output from predefined macro action (the combo) and script. Data sent to FSX should be the same so you should have the same messages in the log.
P.
PS: The debug output will appear in file debug.log when you quit hidmacros.
what is the exact problem you have? Not having the value in list, or the event doesn't work?
I don't have PMDG so can not do full test, but all seems to work...
I changed the FSXevents.lst file adding as first line:
Code: Select all
#70010:PMDG_EVT_MCP_FD_SWITCH_L
REPAIR_AND_REFUEL
DME_SELECT
...
Code: Select all
Exe build number: 2.3.0.685
21:08:39.951 (2278238): Microsoft Flight Simulator X 10.0.61637.0
21:08:39.951 (2278238): SimConnect 10.0.61259.0
21:09:02.031 (2300312): Event #70010 registered as 3
21:09:02.031 (2300312): Event #70010 (3) sent to FSX with param 0.
Code: Select all
C:\Apps\hdm\HIDMacros.exe debug:FSX
P.
PS: The debug output will appear in file debug.log when you quit hidmacros.
Petr Medek
LUAmacros author
LUAmacros author
Re: Add PMDG 737NGX events to the FSX Events list
Petr,
Thanks for checking this. I have the event on the list too, however it doesn't work. Thanks for the tip with the debug, I'll check it in the evening, but I think that the only difference will be #70010 vs. "#70010".
Michal
Thanks for checking this. I have the event on the list too, however it doesn't work. Thanks for the tip with the debug, I'll check it in the evening, but I think that the only difference will be #70010 vs. "#70010".
Michal