Help with getbuffer

Announcements, general discussion
Post Reply
alicerain2020
Posts: 1
Joined: 06 Jul 2018, 02:46

Help with getbuffer

Post by alicerain2020 » 06 Jul 2018, 03:11

Hello community,

I've been using HID Macros since a short while for the task assignment within FSX. Great program by the way :)

Currently I have some bigger problems with the Get.Buffer command.
It's no problem to send the Num-Key (0-9) into the buffer and to use it afterwards for the adjustment of the heading bug...

My problem now is to set the negative vertical speed of the AP!

HIDMacros.FSXtext "Set VS negativ"
HIDMacros.FSXEvent "AP_VS_VAR_SET_ENGLISH", -HIDMacros.GetBuffer
HIDMacros.ClearBuffer
Result: Positive value :?


Dim negativ
negativ = HIDMacros.GetBuffer * -1
HIDMacros.FSXtext "Set VS negativ"
HIDMacros.FSXEvent "AP_VS_VAR_SET_ENGLISH", negativ
HIDMacros.ClearBuffer
Result: Positive value :?

Even if i send "-200" to the buffer, the Result is still positive -> AP VS: 200.

Is there another way to send the positive numbers from the buffer as a negative number to sim connect?

Another question reagrding the use of special keys of the keyboard: I want to use the WIN-Key, NUM, Scroll-Lock-Key etc also for FSX SimConnect Events.
Is there a way to block the NUM-Key, WIN-KEY function to use them as regulary keys?

Thanks for your support!!

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

Re: Help with getbuffer

Post by admin » 09 Jul 2018, 08:23

If you print/debug the negativ variable - does it have the negative value? I mean is the problem with reading buffer or with sending negative value to fsx? Also try to send negative value directly, not using any variable - to see if it works.

Regarding blocking those special keys - not possible I'm afraid.
Petr Medek
LUAmacros author

Post Reply