Page 1 of 1

HIDMacros and Lvar

Posted: 11 Feb 2018, 17:56
by grizzly
I'm using HIDMacros (V 2.3) to manage multiple keyboards ans joysticks.

With PDMG Boeing 737 NGX (FSX, P3D V4) it works perfectly.
I have the const definitions (found in the SDK of Aerosoft) in the general script, and macros for my buttons.

Script:

Const MOUSE_FLAG_LEFTSINGLE = &H20000000
Const MOUSE_FLAG_RIGHTSINGLE = &H80000000
Const EVT_MCP_AT_ARM_SWITCH = "#70012"

a.s.o ...... with all the const of the sdk

Macro:

HIDMAcros.FSXEvent EVT_MCP_AT_ARM_SWITCH, MOUSE_FLAG_LEFTSINGLE

I'd like to know if it's possible to do the same thing with a PMDG Airbus (last versions) using the Lvar's and HIDMacros
I found the Lvar of the airbus in the files given with the product, but I don't know how to use it with HIDMacros.

I don't want to use Linda (to difficult).

Could you post a little script on this forum (just one button,...) using a Lvar as a script of HIDMacros,....

I know that it's possible, I found a post on this forum (2013), a simmer knows how to do it.

I would appriciate it, because I'd like to have a (little) home cockpit of an airbus (not a B737).

Philippe

Re: HIDMacros and Lvar

Posted: 11 Feb 2018, 21:27
by admin
HidMacros can't access lvars.
If you saw some script it could be maybe using FSUIPC?

Re: HIDMacros and Lvar

Posted: 12 Feb 2018, 11:25
by grizzly
Hello,

If it's true, I'll have to fly with a Boeing, not an airbus, ... :(

I do not have any script (see the post below),
But it could perhaps be possible to do something with HIDMacros to use a script to use multiple keyboards with FSUIPC and Linda.

FSUIPC uses One keyboard
Linda Too

I need multiple keyboards managing the commands of the airbus PMDG

Am I wrong ???

I found this post:

http://www.hidmacros.eu/forum/viewtopic.php?f=3&t=183
We had the question, not the answer,..

Re: HIDMacros and Lvar

Posted: 13 Feb 2018, 09:08
by admin
Just to make things clear
- don't expect any changes or investigations in HidMacros. I don't have the build environment any more, I don't have it even installed
- don't expect any tests or investigation (from me) in FSX/P3D. I use LuaMacros to fly Xplane and don't own (or plan to get) P3D. Also question about P3D/FSX support in LuaMacros was already discussed here and it seems there are no Pascal header files for current SimConnect version. Without them it's hard to add some interface

Re: HIDMacros and Lvar

Posted: 13 Feb 2018, 15:44
by grizzly
Hello

Thanks for your post

I know that HIDMACROS (fantastic product) is no longer developed.

But I'm using it, and it's very performant and works even with W10 and P3DV4 (I'm FSX and P3D Addict not Xplane).

I'm using the mouse commands of HIDMacros to click right or left, when I don't know how to manage it in "hard code" but if there is another way to do it I'm asking the entire planet to explain how to do it,.. :D

Thanks to the (ex) developer of HIDMacros, it's great

Re: HIDMacros and Lvar

Posted: 23 Feb 2018, 11:56
by grizzly
It's OK now

I have an easy tip to manage HIDMACROS (for multiple keyboards) and FSUIPC (registered version) to use the Lvars,...

It works,...

If somebody is interested, I'll post how to do it.

Grizzly

Re: HIDMacros and Lvar

Posted: 23 May 2019, 18:26
by gr8guitar
Hello. I'm interested in HIDMacros and LVar's. Could you please post an example? Thanks.

Re: HIDMacros and Lvar

Posted: 03 Sep 2021, 15:56
by gr8guitar
Well, I never did hear back from grizzly. Perhaps he's moved on. I found a way to use HIDMacros and Lvars; here goes:

1) After a key or button is selected, in the script tab write something like this:

HIDMacros.SetFSUIPCInt &H4e0, 2, 1

This will put the value of 1 into the offset 04E0 (an unused Project Magenta offset).

In the *.lua file:

function BravoTQ(offset, val) val = ipc.readUW(0x4E0) ipc.writeLvar("L:WhateverTheLvar", val) end event.offset(0x4E0,"UW",BravoTQ)

This reads the offset val, being 1 in this case, and writes it into L:WhateverTheLvar.

In the *.xml gauge or whatever you use to access the Lvar:

use the (L:WhateverTheLvar, number) as required.