Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - BBA

#1
Scripting Q&A / Change of config with a Lua script
August 01, 2016, 05:10:55 PM
I would like to have your suggestions about writing a Lua script to change the ML config files at will  (and restart ML with the chosen configuration).

Let's suppose we have saved in 2 different directories on the CD card, all the ML/SETTINGS files for 2 different situations:
for instance, a standard situation for 1920x1080x24fps and a special one for  3260x1320x12fps .

We created those directories under the ML directory (to keep them when formatting), let's say:
dir1 = ML/MY_DATA/1920     and
dir2 = ML/MY_DATA/3260 .

To start using a new config, let's say, the 3260x1320x12fps one, we only have to replace the files present in the ML/SETTINGS directory with all the ones that we saved in ML/MY_DATA/3260.

It seems obvious when using a computer to read/write files between directories.
But, I would like to do that in the field, without computer.


One answer would be to be able to send, from within a Lua script, commands to the OS  like ( in DOS syntax ) :
run "del ML\SETTINGS\*.*"
run "copy ML\MY_DATA\3260\*.* ML\SETTINGS\" 
Another answer:
The ML Lua API contains the dryos module with directory:files() and remove( filename) to delete all the files from ML/SETTINGS.
But then, how should we copy the files ?


Many thanks in advance !
#2
User Introduction / Hello from Belgium
June 05, 2016, 10:26:07 AM
I wouldn't have believed, 2 years ago, i would have been able to program a/my camera.
I have learnt a lot reading this forum and still have many times more to learn...endless.
This is an amazing work!
Many thanks to all of you and especially to the devs who have made and still make such great things !!!!!!!!!
My mother language is french; I'll do my best to be as good as possible in english...Forgive me
Imho, they are not "hackers", but high level people.
Many years ago, I have studied engineering (electricity) and have done several jobs; as engineer I am excited in "playing" with technical objects of all sorts.
BBA has been my login at work: that's why I wrote it mechanically in capitals...I hope it won't hurt (may be changed  to bba)
I hope to be able to help and share with others.
Thanks again and see you somewhere in this forum  :)