Calling Lua script

15 views
Skip to first unread message

Matt

unread,
Aug 12, 2009, 10:24:47 AM8/12/09
to ezLCD+ Support Group
Hello,

I am automatically starting my lua script, which can be done with the
StartUpLua user configuration. Based on input from the touchscreen or
RS232 port, I want this script to execute other lua scripts located in
the ROM.

In the external command mode I am able to call a lua script that is
stored in the user ROM area with the RUN_LUA_ROM (0xA8) command. I
have not been able to find this same functionality within a lua
script. Does it exist?

Any suggestions?

Matt

CityHall

unread,
Aug 17, 2009, 10:02:16 AM8/17/09
to ezLCD+ Support Group
Good question. I have been treating each screen as its own function
and using a switch statement to call them, but this has made my script
rather long and hard to navigate. A general function like [ez.external
("RUN_LUA_ROM", 0xA8) ] would be really nice.

Mark Stiebel

unread,
Aug 17, 2009, 4:07:50 PM8/17/09
to ez...@googlegroups.com
The Lua language has a "require" directive, which loads another  lua script in place.  But the ezLCD doesn't seem to support it very well. It's been a while but I can't remember why I don't use it - either because it plain didn't work, or because the IDE made it very difficult to do develop with anything but a single source file.

-= Mark
-= ma...@froop.net
Reply all
Reply to author
Forward
0 new messages