Remote Shoot Function - LUA Scripting - CHDK Forum

Remote Shoot Function

  • 1 Replies
  • 3582 Views
Remote Shoot Function
« on: 14 / September / 2017, 09:10:58 »
Advertisements
Hello everyone,

I'm new to Lua and was trying to modify the chdkptp-gui on my raspberry pi to my needs and wanted to add a button to perform remote shooting plus downloading the picture when it's done.

Taking the picture with "shoot()" and maybe even more by using "sleep(time)" is not the problem but how could I have it download the picture also automatically after it is taken? I know it is in cli that just "shoot -dl" or "remoteshoot [LOCATION]" but how could I have the button perform those cli commands or script it in Lua/Luar?

*

Offline reyalp

  • ******
  • 14121
Re: Remote Shoot Function
« Reply #1 on: 14 / September / 2017, 13:44:48 »
I know it is in cli that just "shoot -dl" or "remoteshoot [LOCATION]" but how could I have the button perform those cli commands or script it in Lua/Luar?
You can use cli:execute to execute CLI commands from Lua code.

In case you haven't already found it, this page may be helpful
https://app.assembla.com/spaces/chdkptp/wiki/Scripting_Guide

To ensure any output from your cli command is printer, you can use cli:print_status, like
cli:print_status(cli:execute('....'))
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal