Lua Macros script not working with Fly with Lua.

Announcements, questions
BradyBrother100
Posts: 13
Joined: 03 May 2019, 01:17

Lua Macros script not working with Fly with Lua.

Post by BradyBrother100 » 05 May 2019, 15:38

Hi! After making a simple Lua Script with Lua Macros and putting the script into the Scripts folder, It never seems to work when I click a button on my other keyboard.

Hope anyone can help!
Attachments
gffdfd.PNG
gffdfd.PNG (10.41 KiB) Viewed 10149 times
dff.PNG
dff.PNG (6.54 KiB) Viewed 10149 times

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

Re: Lua Macros script not working with Fly with Lua.

Post by admin » 13 May 2019, 08:24

Luamacros and FlyWithLua are completely different programs. They are just both using Lua language as "scripting engine". Don't expect luamacros script to work with fly with lua and vice versa.
Petr Medek
LUAmacros author

BradyBrother100
Posts: 13
Joined: 03 May 2019, 01:17

Re: Lua Macros script not working with Fly with Lua.

Post by BradyBrother100 » 16 May 2019, 02:48

That is good to know! I have written the code in LuaMacros with the lmc_xpl_command and when I click the play button, I do not see anything happen in X-Plane. Can you help?

Thanks!

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

Re: Lua Macros script not working with Fly with Lua.

Post by admin » 16 May 2019, 08:15

Did you install lmc plugin? What is the code?
Petr Medek
LUAmacros author

BradyBrother100
Posts: 13
Joined: 03 May 2019, 01:17

Re: Lua Macros script not working with Fly with Lua.

Post by BradyBrother100 » 17 May 2019, 02:03

Hi! I do have the xpl_lmc-plugin in my X-Plane Plugins folder.
Here is my test code for using a second keyboard in X-Plane 11
Attachments
qmgd.PNG
qmgd.PNG (15.81 KiB) Viewed 10127 times

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

Re: Lua Macros script not working with Fly with Lua.

Post by admin » 17 May 2019, 08:16

And are device names correctly assigned? Do you see that "not yet assigned" message for other keys or do you see keyboards with names when printing devices? Is the calc started for C?
Petr Medek
LUAmacros author

BradyBrother100
Posts: 13
Joined: 03 May 2019, 01:17

Re: Lua Macros script not working with Fly with Lua.

Post by BradyBrother100 » 17 May 2019, 13:55

Each Keyboard is named correctly and if I press "c" on one keyboard, it will open the calculator but if I press "c" on the other keyboard ( the one I want to use as an overhead panel ) it will not do anything. C is assigned to Start APU but it does move the switch to the start position. If I am not in X-Plane, nothing happens when I press C.



Thanks!
Attachments
nay.PNG
nay.PNG (31.77 KiB) Viewed 10124 times

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

Re: Lua Macros script not working with Fly with Lua.

Post by admin » 20 May 2019, 08:55

Try if the xpl communication is working with something simplier.
E.g. run script:

Code: Select all

lmc_log_module('XPL')
lmc_xpl_text('From LUA macros')
Doest the text appear in xplane?
Also you can create empty file lmc_log_file_trigger.log in xplane folder and after doing the test check its content.
See some troubleshooting tips for xplane in this thread: http://hidmacros.eu/forum/viewtopic.php?f=10&t=3832
Petr Medek
LUAmacros author

BradyBrother100
Posts: 13
Joined: 03 May 2019, 01:17

Re: Lua Macros script not working with Fly with Lua.

Post by BradyBrother100 » 20 May 2019, 23:10

The communication did work. Know we need to figure out how to make the keyboard interact with the switches.

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

Re: Lua Macros script not working with Fly with Lua.

Post by admin » 21 May 2019, 08:41

Do some debugging then. Try to run xpl command as single line in script - to see if it works.
Try to print debug output from your keyboard handler - too see that "if" command gets executed
Petr Medek
LUAmacros author

Post Reply