Magic Lantern Forum

Developing Magic Lantern => Scripting Corner => Scripting API suggestions => Topic started by: garry23 on December 08, 2016, 06:28:51 PM

Title: [DONE - menu.select] ML access via Lua
Post by: garry23 on December 08, 2016, 06:28:51 PM
Help!

David, if you are watching, I'm stumped (again) on a simple syntax problem.

All I need to do is open a sub menu.

I can use this OK to open the ML Shoot menu

Code: [Select]
menu.open("Shoot")
But how do I a sub menu under Shoot, ie my script called "Auto Bracketing", that I have placed under the Shoot ML menu.

I can't work it out :-(

Cheers

Garry
Title: Re: ML access via Lua
Post by: garry23 on December 08, 2016, 10:33:06 PM
OK, I think I've convinced myself we can't yet open a specific ML menu, as the following doesn't open the Shoot menu:

Code: [Select]
menu.open("Shoot")
...unless someone corrects me ;-)
Title: Re: ML access via Lua
Post by: a1ex on November 05, 2017, 07:54:03 PM
menu.select (http://builds.magiclantern.fm/lua_api/modules/menu.html#select) works:

Code: [Select]
menu.open()
menu.select("Shoot")
also:
Code: [Select]
menu.open()
msleep(1000)
menu.select("Shoot", "Intervalometer")
msleep(1000)
menu.select("Intervalometer", "Take a pic every")

More examples: test_menu in api_test.lua (http://builds.magiclantern.fm/lua_api/examples/api_test.lua.html).