save and get enviroment variables - Feature Requests - CHDK Forum

save and get enviroment variables

  • 2 Replies
  • 3271 Views
*

Offline acorrias

  • *
  • 20
  • [A650IS]
save and get enviroment variables
« on: 05 / January / 2009, 16:31:12 »
Advertisements
Hi
it would be useful to dump values to a file system in order to get them during next executions.

I imagine two new command:
-putvalue "key" v to save the value V into the file system (a structured file just like the windows ini file)
-a=getvalue(key) to get the previuos saved value

the key could be an integer to have a more simple syntax

With these two command it would be easy to write a script that saves the current exposure value and a second script that gets the saved value and set the exposition to this value in order to emulate the AELOCK function through a set of shoots.
Each time I invoke this second script I could take ae locked exposition shoot.

I had this idea because my A650IS doesn't support the AELOCK with P, Tv e AV modes (I'd like to make panoramas) since it resets to automatic exposition after the first shoot.

thanks in advance
alex

*

Offline reyalp

  • ******
  • 14138
Re: save and get enviroment variables
« Reply #1 on: 05 / January / 2009, 22:13:48 »
You can read and write files with lua.

An easy way to store key/value pairs is to same them as lua code which defines a table.
Don't forget what the H stands for.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: save and get enviroment variables
« Reply #2 on: 06 / January / 2009, 04:34:29 »
Would the elegant way be to change script parameters from the script by implementing a way to change conf.ubasic_vars[] from a script?


 

Related Topics


SimplePortal © 2008-2014, SimplePortal