Page 1 of 2
Lua Macros script not working with Fly with Lua.
Posted: 05 May 2019, 15:38
by BradyBrother100
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!
Re: Lua Macros script not working with Fly with Lua.
Posted: 13 May 2019, 08:24
by admin
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.
Re: Lua Macros script not working with Fly with Lua.
Posted: 16 May 2019, 02:48
by BradyBrother100
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!
Re: Lua Macros script not working with Fly with Lua.
Posted: 16 May 2019, 08:15
by admin
Did you install lmc plugin? What is the code?
Re: Lua Macros script not working with Fly with Lua.
Posted: 17 May 2019, 02:03
by BradyBrother100
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
Re: Lua Macros script not working with Fly with Lua.
Posted: 17 May 2019, 08:16
by admin
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?
Re: Lua Macros script not working with Fly with Lua.
Posted: 17 May 2019, 13:55
by BradyBrother100
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!
Re: Lua Macros script not working with Fly with Lua.
Posted: 20 May 2019, 08:55
by admin
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
Re: Lua Macros script not working with Fly with Lua.
Posted: 20 May 2019, 23:10
by BradyBrother100
The communication did work. Know we need to figure out how to make the keyboard interact with the switches.
Re: Lua Macros script not working with Fly with Lua.
Posted: 21 May 2019, 08:41
by admin
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