Script (lua) api - LUA Scripting - CHDK Forum
supplierdeeply

Script (lua) api

  • 5 Replies
  • 3214 Views
Script (lua) api
« on: 08 / December / 2010, 16:49:00 »
Advertisements
Hi

I am new in chdk world but not in the lua world.

I can't find a page which describe all the basic script functions
For exemple where to find detail on "get_exp_count()" and all others avaiable functions?

Is there a page which describe all functions?

Thanks
and sorry if I am just a bad googler

*

Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Script (lua) api
« Reply #1 on: 08 / December / 2010, 17:13:58 »
This is probably a good place to start

HTH,

wim

*

Offline reyalp

  • ******
  • 11920
Re: Script (lua) api
« Reply #2 on: 08 / December / 2010, 22:43:06 »
Hi

I am new in chdk world but not in the lua world.

I can't find a page which describe all the basic script functions
For exemple where to find detail on "get_exp_count()" and all others avaiable functions?

Is there a page which describe all functions?
Unfortunately, there is not, the documentation is spread over several places, and is not complete.

In addition to the page that whim linked, the following have documentation for many of the script functions http://chdk.wikia.com/wiki/CHDK_firmware_usage/MoreBest#New_uBASIC_and_LUA_Scripting_Commands.21

http://chdk.wikia.com/wiki/CHDK_firmware_usage/AllBest#Current_List_of_uBASIC_Operations_and_Commands:

Note that ubasic and lua share many of the same functions, which is part of the reason the documentation
is scattered around.

When in doubt, consult the source http://tools.assembla.com/chdk/browser/trunk :)
Don't forget what the H stands for.

Re: Script (lua) api
« Reply #3 on: 09 / December / 2010, 02:53:40 »
thanks reyalp for yours new links, which are verry usefull


Re: Script (lua) api
« Reply #4 on: 13 / December / 2010, 10:30:03 »
I've made this spreadsheet listing all the CHDK specific Lua words in version 0.9.9. It's alphabetical an can be filtered by type. e.g. 'keys' displays only words that relate to the camera controls.

The spreadsheet isn't complete because I'm not sure what some of the words do for sure - the descriptions elsewhere don't give enough detail quite often.

Can someone else fill some of the remaining gaps in and correct any mistakes found?

I've attached the spreadsheet (no macros or visual basic)

Cheers, Bob

Re: Script (lua) api
« Reply #5 on: 16 / December / 2010, 04:33:23 »
Here's the Lua words spreadsheet with some additions and corrections - i want to make it more of a single reference for Lua programming on the camera. It's still far from complete but getting there.

I've found  the chdkcam version of chdk invaluable to control the camera and run snippets of Lua code over the USB link. No more memory card swapping. Shame it's not available for all cameras.

If anyone wants to add or fix stuff, feel free to repost with an updated version of the spreadsheet. Keep the descriptions short but enough to be useful. e.g. include value ranges, return types etc.

 

Related Topics