PMDG 737NGX Landing Lights

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
traigla
Posts: 1
Joined: 21 Dec 2015, 20:43

PMDG 737NGX Landing Lights

Post by traigla » 21 Dec 2015, 20:54

I've tried using this code to turn on/off the landing lights. They turn off fine, but they won't turn on.

Here's the code in the macro key

Code: Select all

L1 = HIDMacros.GetFSUIPCInt(LTS_LandingLtRetractableSw, 2)
L2 = HIDMacros.GetFSUIPCInt(LTS_LandingLtFixedSw, 2)

if (Round(L1)+Round(L2) > 0) then
  HIDMacros.FSXEvent EVT_OH_LAND_LIGHTS_GUARD, MOUSE_FLAG_RIGHTSINGLE
else
  HIDMacros.FSXEvent EVT_OH_LAND_LIGHTS_GUARD, MOUSE_FLAG_LEFTSINGLE
end if
It seems everytime it passes the if statement as if it's always bigger than 0.

Here's the code in the main script

Code: Select all

Const LTS_LandingLtRetractableSw = &H64F4   ' values from FSUIPC PDF
Const LTS_LandingLtFixedSw = &H64F6
Const EVT_OH_LAND_LIGHTS_GUARD = "#69742"
Const MOUSE_FLAG_LEFTSINGLE = &H20000000   ' values from PMDG SDK.h
Const MOUSE_FLAG_RIGHTSINGLE = &H80000000
Any help to solve is greatly appreciated

Post Reply