Add PMDG 737NGX events to the FSX Events list

What features you would like to have in HIDmacros?
ryhoo2
Posts: 21
Joined: 24 Feb 2013, 17:57
Location: Poland

Re: Add PMDG 737NGX events to the FSX Events list

Post by ryhoo2 » 11 Mar 2013, 22:28

Ok Petr,
We're almost there. It actually works on the "Predefined" tab at the "Send Simconnect Event (FSX)" section. But what I meant is to launch a custom event from the "Scripted" tab, like this:
HIDMacros.FSXEvent PMDG_EVT_MCP_FD_SWITCH_L, MOUSE_FLAG_LEFTSINGLE

Here's the debug from it:

Code: Select all

22:26:12.398 (1853151): Event  registered as 3
22:26:12.398 (1853151): Event  (3) sent to FSX with param 536870912.
As you can see there's no event number in the debug, only a single space.

admin
Site Admin
Posts: 521
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Add PMDG 737NGX events to the FSX Events list

Post by admin » 11 Mar 2013, 23:29

Hmm, but I don't see much added value in this feature.
What you want is basically include some translation table into HIDmacros code.
But why?
a) you can script such function yourself in Routines section
b) if you're scripting the macro you're working with the code anyway, so what's the difference in using hex value or some constant with nice name? Usually you prepare & tune the macro once and then you don't care
Compared to standard FSX events you search SimConnect docs anyway (or SDK docs for PMDG) and at the end you copy the event name or hex value. You can always put some comment to your code if you want to recall what the hex value does.

So we can keep discussing, but now this request seems to have very low priority for me...
Petr Medek
LUAmacros author

ryhoo2
Posts: 21
Joined: 24 Feb 2013, 17:57
Location: Poland

Re: Add PMDG 737NGX events to the FSX Events list

Post by ryhoo2 » 12 Mar 2013, 11:02

As you know having the action for the key scripted (on the "Scripted" tab) gives you much more flexibility and functionality that you can build on a single key action. Especially for such mature aircraft like PMDG 737NGX. Adding these events and ability to use them in scripts will make the scripting much more easy and clear for the user (no need to define and use event numbers itself). I have my keyboard layout almost ready my Routines section look preety complicated because of the whole constants section.

Since it's already working on the "Predefined" tab it should be straight-forward for you. Probably you only need to add those double-quotes somewhere in the FSXEvent method. I can populate the .lst file with all PMDG events for you.

admin
Site Admin
Posts: 521
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Add PMDG 737NGX events to the FSX Events list

Post by admin » 12 Mar 2013, 12:24

My point is what is the difference for you in script for those 2 commands:

Code: Select all

HIDMacros.FSXEvent PMDG_EVT_MCP_FD_SWITCH_L, 0
HIDMacros.FSXEvent "#70010", 0 'PMDG_EVT_MCP_FD_SWITCH_L
I don't see any added value apart having nice script (but who cares :-))

Btw even if I add some function for sending events based on their title in pre-defined combo, what about the argument? In your example MOUSE_FLAG_LEFTSINGLE?
Would you keep it in your routines section? Because the combo and lst file don't solve it currently.
Petr Medek
LUAmacros author

ryhoo2
Posts: 21
Joined: 24 Feb 2013, 17:57
Location: Poland

Re: Add PMDG 737NGX events to the FSX Events list

Post by ryhoo2 » 12 Mar 2013, 14:02

My point is that you can exactly identify the event by it's friendly name, but try to do that by the number without looking in the SDK? Not everyone is familiar with the SDK and it's internals (for each event you need to do some calculation and stuff). That will make the programming much easier for others.
Ask anyone using internal FSX events if they know which number correspond to the event?:) They don't need to know it because friendly name says everything you need to know.

And the parameters used (for ex. MOUSE_FLAG_LEFTSINGLE) are like 2 or 3 values to define in Routines, I can live with that.

admin
Site Admin
Posts: 521
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Add PMDG 737NGX events to the FSX Events list

Post by admin » 13 Mar 2013, 23:48

Michal,

download the exe again, execute (with admin rights) and try to use script like

Code: Select all

HIDMacros.FSXEventByTitle "Nav 1 radio swap", 0
The first argument is event title - second part of line in lst file, so would be your PMDG event user-friendly string.
Petr Medek
LUAmacros author

ryhoo2
Posts: 21
Joined: 24 Feb 2013, 17:57
Location: Poland

Re: Add PMDG 737NGX events to the FSX Events list

Post by ryhoo2 » 14 Mar 2013, 19:20

That works, thanks!
When I have some more time I will send you the .lst file with all the PMDG events defined.

G.Ahrens
Posts: 7
Joined: 20 May 2013, 03:37

Re: Add PMDG 737NGX events to the FSX Events list

Post by G.Ahrens » 20 May 2013, 03:44

Hello,
I am working on my home cockpit again and stumbled upon this tool, I like the way it works and what it does for FSX.
I too am thinking about getting a PMDG 737NGX and would like to implement multiple keyboards for the setup to begin with while I take time in making panels.
I am curious as to the work ryhoo2 has been working with and if he has been successful in implementing PMDG events or has compiled the list?

Thanks and take care.
Greg.

admin
Site Admin
Posts: 521
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Add PMDG 737NGX events to the FSX Events list

Post by admin » 20 May 2013, 07:33

The application is ready, but so far I have not received the lst file from Michal.
Petr Medek
LUAmacros author

G.Ahrens
Posts: 7
Joined: 20 May 2013, 03:37

Re: Add PMDG 737NGX events to the FSX Events list

Post by G.Ahrens » 20 May 2013, 14:19

I just purchased PMDG 737 NGX 800/900 last night.
I don't have much experience scripting or coding but I manage to stumble through.
I will try to get you that list.
Thank you,
Greg

Post Reply