lua advice

  • 5 Replies
  • 2284 Views
lua advice
« on: 10 / February / 2009, 07:17:31 »
Advertisements
Hi,  I'm new to lua & chdk script writing so request some advice please.  I've buried my head in lua syntax  (well,  reading in the bath anyway)  & need to get a couple of chdk concepts sorted before I kick off.

Is there a library of chdk specific functions for lua  or are the ubasic one's used?

Is there access to actual values set on the camera or can we just simulate button presses?  I notice that the bracketing script has to have the +- exposure visible on display & the script simulates left/right button presses to adjust exposure.

thanks in advance

drewster
G9, Ixus75

Re: lua advice
« Reply #1 on: 10 / February / 2009, 09:00:10 »
i'm attempting to finish up some lua libraries but they're giving me some very odd problems. perhaps i should psot them and see if i get any help with the problem.

i believe all the ubasic functions work in lua. there are some irregularities to chdk lua compared to regular lua. these are summarized here - http://chdk.wikia.com/wiki/LUA

Re: lua advice
« Reply #2 on: 10 / February / 2009, 09:39:05 »

Re: lua advice
« Reply #3 on: 10 / February / 2009, 11:45:10 »
Hi Matt,  excellent,  thank you.  Is there a brief description of the functionality of each function.  sorry if it's obvious,  I'm new to this.
G9, Ixus75


Re: lua advice
« Reply #4 on: 10 / February / 2009, 12:05:07 »
better documentation of the lua libs is needed but the function names should explain well enough if you're familiar with programming for chdk. feel free to ask specific questions.

*

Offline reyalp

  • ******
  • 11514
Re: lua advice
« Reply #5 on: 10 / February / 2009, 22:39:41 »
Hi,  I'm new to lua & chdk script writing so request some advice please.  I've buried my head in lua syntax  (well,  reading in the bath anyway)  & need to get a couple of chdk concepts sorted before I kick off.

Is there a library of chdk specific functions for lua  or are the ubasic one's used?
For built in CHDK/camera functions, it's pretty much the same as ubasic, with some minor exceptions due to language differences. Lua also has modified versions of the standard LUA io, os, math and string libraries. For libraries written in lua, matt's answer applies.

Quote
Is there access to actual values set on the camera or can we just simulate button presses?
Both are possible. Many interesting values are in http://chdk.wikia.com/wiki/Propertycase

You can also read and write camera memory directly with peek and poke if you are feeling brave or stupid ;)
Don't forget what the H stands for.

 

Related Topics