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

P3D v4 HIDMacros rebuild or new build.

Messages
35
Country
sweden
I would like to get in touch with a programmer who knows how to rebuild or build a new HIDMacros.

Some years ago I found HIDMacros at the web. A freeware made by Petr Medek and available
at his website http://www.hidmacros.eu/.
HIDMacros made it possible to have more than one keybord connected to a computer and have every
key unique. This by programming every key in HIDMacros. A very handsome program to build a simple cockpit.

But Petr Medek doesn't do any upgrade of HIDMacros any more. He has released the program and
the source code as freware.
Look at http://www.hidmacros.eu/forum/viewtopic.php?f=10&t=241#p794
and http://www.hidmacros.eu/forum/viewtopic.php?f=3&t=221

I have used HIDMacros to FS2004, FSX and P3Dv3 at both Windows7 32 bit and Windows10 64 bit.
It has worked perfectly all the time. Look at me site http://snell.se/flightsim/?Mina_projekt___Simple_Cockpit
unfortunately most in Swedish.

But now I bought P3DV4 64 bit from Lockheed Martin. And (of course) HIDMacros doesn't work in P3DV4!
To me it looks like the SimConnect does not connect to P3DV4.

A rebuild of the macro would be required. But I do not have required knowledge.

Will you do the job for me and every other flysimmer I will be very grateful.
Tell me and I will give you more information as much as I can.

Jonny
 
Bonjou Jonny,

As I have told you on the HIDMacos Forum, I have the same problem than yours with P3DV4.
HIDMacros use FSX-SP1 Simconnect to dialog with P3D, it was working with V3.

As HIDMacros is a 32 bits exec application running outside P3D, there no reason why it is not working with V4.

To test, I wrote a little program wich use the SimConnect_Open function with the FSX-SP1 SDK environnment and I got the same problem than HIDMacros. It is working in V3 but not in V4.

I can say that when I compile and link it with the FSK-SP2 environnement, it works in both case V3 and V4.

I posted on the P3D SimConnect subforum, but I did not get any answer.
http://www.prepar3d.com/forum/viewtopic.php?f=6310&t=125245

May be you can make a post yoursef on the subject, it will show them I am not alone, and who knows, they may be find where is the problem.

Thanks Cheers
Claude
 
Have you tried his Luamacros - I know it's only beta. I'm looking at why hidmacros does not work, but changing over to lazarus from turbo delphi is a real pain.

Using luamacros, it does not have the GUI to help with script setup - so you have to work a little harder.
 
Just a wild guess, but did you install the legacy versions of SimConnect to P3Dv4?
 
Hi N4gix,
What do you mean by
to P3DV4.
In my case, I have reinstalled all the legacy versions, from the V4 redist directory with no hope as this redist directory is exacly the same than the one in P3DV3, which for me is logic.
Cheers
Claude
 
Hi all and thanks for the answers,

I have looked a little at LUA but I am not able to do any advance programming with LUA. As I understand from Prepar3d forum 'SimConnect Interface Questions' there are many more having troubble with Simconnect. Maybee we have to wait until Prepar3D do something to Simconnect.

Regards
Jonny
 
Just a little update on this. I have been using lazarus (delphi clone) to get delphi/pascal simconnect.pas to talk to P3D v4. So far I made minor changes and have recompiled the example code, basically the the C++ examples that have been converted to delphi/pascal code, and got them to work with P3D v4.

Now hidmacros uses some delphi code that is not directly compatible with lazarus, so it will not compile .... yet.

I only had to change the manifest file in the SimConnect1A folder, and recompile the resource using VS2015 rc. So here is my new SimConnect.Pas.embed.manifest file.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency optional= "yes">
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency optional= "yes">
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.FlightSimulator.SimConnect" version="10.0.61259.0" processorArchitecture="x86" publicKeyToken="67c7c14424d61b5b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

I don't really know yet if you need the VC80 file, but I changed the version to the one I had in my WinSXS.

This is a text file you run rc on. The Simconnect.rc file basically contains one line.

Code:
1 24  "SimConnect.Pas.embed.manifest"

You use the VS cmd box to run rc

Code:
rc SimConnect.rc

It creates the SimConnect.res file.

I use 10.0.61259.0 version of simconnect from redist in P3D v4.

P.S.

OpenTrack has some manifest files too. I think they have their files mixed up (not sure). So I'm sure OpenTrack can be modified for P3D v4 too.
 
Hi Ron,

That's good news.
I use 10.0.61259.0 version of simconnect from redist in P3D v4.

I noticed that is the only one which works with P3D V4, except of course when the simconnect is the P3D one embedded in the application code.

Thank you very much for your work.
Cheers
Claude
 
Hi Ron and Claude

Good to see you are working on the problem. I would be very happy if I get a HIDMacros working in P3DV4.

Regards,
Jonny
 
Hi,
While Ron was working on the recompilation of HIDMacros with Lazarus, I decided to try with Delphi 10.2 as the application was made with turbo Delphi I thought it should be easier. It was not, and I only get tons of errors related to the String and ANSI String and a lot of other errors... After trying to fix them for 3 days I gave up.

Then I tried to replace the manifest inside the application using the MT.exec tools provided with the Microsoft SDK to force HIDMAcros to use SP2 SImConnect. But no chance.

I noticed that there was a difference between SP1 and SP2. A new parameter exists in the Open function for SP2 which forces the local connection. I decided to try my test SP1 program in a network environment..... Bingo it was working.

To resume if you want HIDMacros to work with P3DV4, just let believe it that you are in a network connection, with a Simconnect.XML in the P3D V4 AppData folder and a Simconnect.cfg in the HIDMacros folder.

For me it works now.
Cheers
Claude
 
Claude,

Good find. I was still working on HidMacros with lazarus. Made some progress. However, the killer is that delphi/turbo pascal is different in XML read/write parse and the MS Scripting code. I was able to get a blank HidMacros form to show and connect to P3D v4, but then crashes. There are way too many changes needed to make this work. It can be done, but I just don't have the time. I see that LuaMacros may be a better option. Since this is already being written in lazarus all that is needed is the simconnect.pas to be created. BUT, that is already done. Luamacros can probably use the existing simconnect.pas, but just link to the proper SP2 version rather than the SP1.

So I am going to abandon HidMacros and do some tinkering in LuaMacros. Stay tuned.
 
Hi Ron and Claude

Thank's for your try, I will test later on. I am on holidays for now.

Regards,
Jonny
 
Thank's for your try, I will test later on. I am on holidays for now.

So I am going to abandon HidMacros and do some tinkering in LuaMacros. Stay tuned.

Hi Jonny and Ron,
I realize this is a really old thread, but would like to know if you ever go HIDMacros or LuaMacros to work with P3Dv4? I'm using P3Dv4.5 and would like to use two keyboards with all keys being unique.
Thx,
Al
 
Hi Jonny and Ron,
I realize this is a really old thread, but would like to know if you ever go HIDMacros or LuaMacros to work with P3Dv4? I'm using P3Dv4.5 and would like to use two keyboards with all keys being unique.
Thx,
Al

Hi Al,

Glad to hear you will use HIDMacros with P3DV4. I am using HIDMacros in my P3DV4.5 sim and it works very well, I have now four keybords in use! You my find som tips at my site http://snell.se/flightsim/?Mina_projekt___Simple_Cockpit , most in Swedish but some in English.
Jonny
 
Glad to hear you will use HIDMacros with P3DV4. I am using HIDMacros in my P3DV4.5 sim and it works very well, I have now four keybords in use! You my find som tips at my site http://snell.se/flightsim/?Mina_projekt___Simple_Cockpit , most in Swedish but some in English.
Jonny

Hi Jonny,
I went to your website and have been trying to get HIDMacros to work, but am having problems. When I start P3Dv4.5 I get a "Can't connect to P3D" error message. Here is what I've have done:
1. Put the Simconnect.cfg file in my root P3Dv4 folder (where I have my Prepar3D.exe application)
2. Put the SimConnect.XLM file at C:\Users\Al\AppData\Roaming\Lockheed Martin\Prepar3D v4
3. In each of the above files I changed the address entry to my public IP address (also tried my computer's address).
4. Forwarded port 2024 to my computer
Thanks for any suggestions.
Al
 
My P3DV4 and HIDMacros works very well. First I have all my flightsim program at an own disk outside Microsoft control, I run all my program as Administrator and install all my program as Administrator. Do you run as this?
Jonny
 
My P3DV4 and HIDMacros works very well. First I have all my flightsim program at an own disk outside Microsoft control, I run all my program as Administrator and install all my program as Administrator. Do you run as this?
Jonny

I am still getting the "Cannot connect to P3D" error message, BUT if I run HIDMarcos as Administrator, it seems to work anyway! :)
So now I just need to figure out where that error message is coming from.
Al
 
Jonny,
After spending most of the day trying to get HIDMacros working with the SimConnect.XML and SimConnect.cfg files, I have discovered that with HID Macros run in administrator mode,
these files are apparently NO longer needed with the very latest version of P3Dv4.5 (which includes HF2 I assume). I deleted the SimConnect.XML and Simconnect.cfg files, shutdown and restarted the computer, and HIDMacros still seems to work! :D I was so surprised I shutdown and restarted the computer two more times just to re-check! However, the only HIDMacros options I have tried so far are Send Simconnect Event and Send Keyboard Sequence.
So maybe Lockheed Martin changed something in the SimConnect area??
Al
 
Nice to hear you are running HIDMacros at last. At AVSIM you have a very good help: https://www.avsim.com/files/file/87-avsim-prepar3d-guide/ Explain intalling P3DV4 and about simconnect as well. FSUIPC is a good help with many commands as well. It's well worh the cost! http://home2.btconnect.com/petedowson/

Jonny

Yes Jonny, I agree with you that FSUIPC is a wonderful tool. I have been using it for many years and have written many Lua scripts for use in both FSX and P3D. I sure hope there will be a version of FSUIPC for the new MSFS.
Al
 
Back
Top