Jump to content
The simFlight Network Forums
Sign in to follow this  
Jorik

Creating NGX CDU LUA

Recommended Posts

Hi there guys,

I'm reading through the forum for a a few hours but I can't really find a help in where to start.

I would love to create a LUA script so I can assign my CDU buttons to the keypress menu in to FSUIPC.

I found the logs for all the CDU buttons so I hope its not really a big problem.

Please note: Thanks to EmileB for the LUA file.

-- ## CDU ###############

function NGX_CDU_LSK_1L ()

ipc.control(70166, 536870912)

end

function NGX_CDU_LSK_2L ()

ipc.control(70167, 536870912)

end

function NGX_CDU_LSK_3L ()

ipc.control(70168, 536870912)

end

function NGX_CDU_LSK_4L ()

ipc.control(70169, 536870912)

end

function NGX_CDU_LSK_5L ()

ipc.control(70170, 536870912)

end

function NGX_CDU_LSK_6L ()

ipc.control(70171, 536870912)

end

function NGX_CDU_LSK_1R ()

ipc.control(70172, 536870912)

end

function NGX_CDU_LSK_2R ()

ipc.control(70173, 536870912)

end

function NGX_CDU_LSK_3R ()

ipc.control(70174, 536870912)

end

function NGX_CDU_LSK_4R ()

ipc.control(70175, 536870912)

end

function NGX_CDU_LSK_5R ()

ipc.control(70176, 536870912)

end

function NGX_CDU_LSK_6R ()

ipc.control(70177, 536870912)

end

function NGX_CDU_INIT_REF ()

ipc.control(70178, 536870912)

end

function NGX_CDU_RTE ()

ipc.control(70179, 536870912)

end

function NGX_CDU_CLB ()

ipc.control(70180, 536870912)

end

function NGX_CDU_CRZ ()

ipc.control(70181, 536870912)

end

function NGX_CDU_DES ()

ipc.control(70182, 536870912)

end

function NGX_CDU_MENU ()

ipc.control(70183, 536870912)

end

function NGX_CDU_LEGS ()

ipc.control(70184, 536870912)

end

function NGX_CDU_DEP_ARR ()

ipc.control(70185, 536870912)

end

function NGX_CDU_HOLD ()

ipc.control(70186, 536870912)

end

function NGX_CDU_PROG ()

ipc.control(70187, 536870912)

end

function NGX_CDU_EXEC ()

ipc.control(70188, 536870912)

end

function NGX_CDU_N1_LIMIT ()

ipc.control(70189, 536870912)

end

function NGX_CDU_FIX ()

ipc.control(70190, 536870912)

end

function NGX_CDU_PREV_PAGE ()

ipc.control(70191, 536870912)

end

function NGX_CDU_NEXT_PAGE ()

ipc.control(70192, 536870912)

end

function NGX_CDU_1 ()

ipc.control(70193, 536870912)

end

function NGX_CDU_2 ()

ipc.control(70194, 536870912)

end

function NGX_CDU_3 ()

ipc.control(70195, 536870912)

end

function NGX_CDU_4 ()

ipc.control(70196, 536870912)

end

function NGX_CDU_5 ()

ipc.control(70197, 536870912)

end

function NGX_CDU_6 ()

ipc.control(70198, 536870912)

end

function NGX_CDU_7 ()

ipc.control(70199, 536870912)

end

function NGX_CDU_8 ()

ipc.control(70200, 536870912)

end

function NGX_CDU_9 ()

ipc.control(70201, 536870912)

end

function NGX_CDU_Period ()

ipc.control(70202, 536870912)

end

function NGX_CDU_0 ()

ipc.control(70203, 536870912)

end

function NGX_CDU_Sign ()

ipc.control(70204, 536870912)

end

function NGX_CDU_A ()

ipc.control(70205, 536870912)

end

function NGX_CDU_B ()

ipc.control(70206, 536870912)

end

function NGX_CDU_C ()

ipc.control(70207, 536870912)

end

function NGX_CDU_D ()

ipc.control(70208, 536870912)

end

function NGX_CDU_E ()

ipc.control(70209, 536870912)

end

function NGX_CDU_F ()

ipc.control(70210, 536970912)

end

function NGX_CDU_G ()

ipc.control(70211, 536870912)

end

function NGX_CDU_H ()

ipc.control(70212, 536870912)

end

function NGX_CDU_I ()

ipc.control(70213, 536870912)

end

function NGX_CDU_J ()

ipc.control(70214, 536870912)

end

function NGX_CDU_K ()

ipc.control(70215, 536870912)

end

function NGX_CDU_L ()

ipc.control(70216, 536870912)

end

function NGX_CDU_M ()

ipc.control(70217, 536870912)

end

function NGX_CDU_N ()

ipc.control(70218, 536870912)

end

function NGX_CDU_O ()

ipc.control(70219, 536870912)

end

function NGX_CDU_P ()

ipc.control(70220, 536870912)

end

function NGX_CDU_Q ()

ipc.control(70221, 536870912)

end

function NGX_CDU_R ()

ipc.control(70222, 536870912)

end

function NGX_CDU_S ()

ipc.control(70223, 536870912)

end

function NGX_CDU_T ()

ipc.control(70224, 536870912)

end

function NGX_CDU_U ()

ipc.control(70225, 536870912)

end

function NGX_CDU_V ()

ipc.control(70226, 536870912)

end

function NGX_CDU_W ()

ipc.control(70227, 536870912)

end

function NGX_CDU_X ()

ipc.control(70228, 536870912)

end

function NGX_CDU_Y ()

ipc.control(70229, 536870912)

end

function NGX_CDU_Z ()

ipc.control(70230, 536870912)

end

function NGX_CDU_Space ()

ipc.control(70231, 536870912)

end

function NGX_CDU_DEL ()

ipc.control(70232, 536870912)

end

function NGX_CDU_FwdSlash ()

ipc.control(70233, 536870912)

end

function NGX_CDU_CLR ()

ipc.control(70234, 536870912)

end

Please note: Thanks to EmileB for the LUA file.

Thanks in advance.

Share this post


Link to post
Share on other sites

well a macro file is a lot easyer to do while new to it. but wait as im doeing the file for you now as macro then you can study what i have done... and use it right away.. and would be easyer to set in fsuipc as you can see the command name and dont have to use parameter.

Share this post


Link to post
Share on other sites

well here is the macrofile.... have fun and plz study. and test it as only limited tested...

If you want to create the macrofile your self insted just craeate a new macrofile and place this inside the dokument and save it.

[Macros]

1=LSK_1L 
1.1=C70166, 536870912

2=LSK_2L
2.1=C70167, 536870912

3=LSK_3L
3.1=C70168, 536870912

4=LSK_4L
4.1=C70169, 536870912

5=LSK_5L
5.1=C70170, 536870912

6=LSK_6
6.1=C70171, 536870912

7=LSK_1R
7.1=C70172, 536870912

8=LSK_2R
8.1=C70173, 536870912

9=LSK_3R
9.1=C70174, 536870912

10=LSK_4R
10.1=C70175, 536870912

11=LSK_5R
11.1=C70176, 536870912

12=LSK_6R
12.1=C70177, 536870912

13=INIT_REF
13.1=C70178, 536870912

14=RTE
14.1=C70179, 536870912

15=CLB
15.1=C70180, 536870912

16=CRZ
16.1=C70181, 536870912

17=DES
17.1=C70182, 536870912

18=MENU
18.1=C70183, 536870912

19=LEGS
19.1=C70184, 536870912

20=ARR
20.1=C70185, 536870912

21=HOLD
21.1=C70186, 536870912

22=PROG
22.1=C70187, 536870912

23=EXEC
23.1=C70188, 536870912

24=N1_LIMIT
24.1=C70189, 536870912

25=FIX
25.1=C70190, 536870912

26=PREV_PAGE
26.1=C70191, 536870912

27=NEXT_PAGE
27.1=C70192, 536870912

28=1
28.1=C70193, 536870912

29=2
29.1=C70194, 536870912

30=3
30.1=C70195, 536870912

31=4
31.1=C70196, 536870912

32=5
32.1=C70197, 536870912

33=6
33.1=C70198, 536870912

34=7
34.1=C70199, 536870912

35=8
35.1=C70200, 536870912

36=9
36.1=C70201, 536870912

37=Period
37.1=C70202, 536870912

38=0
38.1=C70203, 536870912

39=Sign
39.1=C70204, 536870912

40=A
40.1=C70205, 536870912

41=B
41.1=C70206, 536870912

42=C
42.1=C70207, 536870912

43=D
43.1=C70208, 536870912

44=E
44.1=C70209, 536870912

45=F
45.1=C70210, 536970912

46=G
46.1=C70211, 536870912

47=H
47.1=C70212, 536870912

48=I
48.1=C70213, 536870912

49=J
49.1=C70214, 536870912

50=K
50.1=C70215, 536870912

51=L
51.1=C70216, 536870912

52=M
52.1=C70217, 536870912

53=N
53.1=C70218, 536870912

54=O
54.1=C70219, 536870912

55=P
55.1=C70220, 536870912

56=Q
56.1=C70221, 536870912

57=R
57.1=C70222, 536870912

58=S
58.1=C70223, 536870912

59=T
59.1=C70224, 536870912

60=U
60.1=C70225, 536870912

61=V
61.1=C70226, 536870912

62=W
62.1=C70227, 536870912

63=X
63.1=C70228, 536870912

64=Y
64.1=C70229, 536870912

65=Z
65.1=C70230, 536870912

66=Space
66.1=C70231, 536870912

67=DEL
67.1=C70232, 536870912

68=FwdSlash
68.1=C70233, 536870912

69=CLR
69.1=C70234, 536870912

CDU_737NGX.zip

Share this post


Link to post
Share on other sites

Thank you so much.

This did the trick.

Here I have a new little question.

Is there a way to program something so that the panel automatically moves an resizes to the CDU screen.

This would be so easy.

Share this post


Link to post
Share on other sites

Is there a way to program something so that the panel automatically moves an resizes to the CDU screen.

Is it an undocked FS window? Can't you just do it and save the Flight? It should come back next time to the same position?

Pete

  • Upvote 1

Share this post


Link to post
Share on other sites

Is it an undocked FS window? Can't you just do it and save the Flight? It should come back next time to the same position?

Pete

Hi Pete,

I was trying to do this in Fullscreen.

But when I save the flight it comes back to the CDU but way to big.

And NGX after HotFix4 has a problem with saving and loading the previous flight so that ends the save option to, its temporary offcourse until SP1.

Share this post


Link to post
Share on other sites

I was trying to do this in Fullscreen.

But when I save the flight it comes back to the CDU but way to big.

And NGX after HotFix4 has a problem with saving and loading the previous flight so that ends the save option to, its temporary offcourse until SP1.

Ah, sorry then, I don't know. But i think there's a program which you can run which saves and restores assorted windows positions. Ask over in the general FSX Forum.

I use a hardware cockpit, no FS gauges, so only the scenery from FSX on a projection. I've never really messed with undocked gauges and windows.

Pete

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.