Script for "Press Shutter XX times Loop"

  • 18 Replies
  • 2844 Views
*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Script for "Press Shutter XX times Loop"
« on: 09 / January / 2016, 02:12:09 »
Advertisements
Hello.

I have absolutely NO background in scripting and need help, please!

I need a script to "Press Shutter XX times Loop". I click photos by setting my CHDK parameters, but I need to press the shutter multiple times, since I always shoot 5-20 shots as I have very shaky hands and sometimes when I click the photo blurs. Plus I often use Photoshop and stack images, create smart object and remove noise using mean/median and also love shooting HDR.

And for all these I need to have multiple photos. I command HDR to take 3 pics, +2 0 -2 but have to press shutter every time after 3 shots. I just need a command that automatically loops the shoot and automatically presses the shutter for 5x, 10x, 15x, etc.

I would really appreciate some help. I tried searching the net, but didn't find what I'm looking for.

Thanks, I sincerely appreciate your help.
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.



Re: Script for "Press Shutter XX times Loop"
« Reply #1 on: 09 / January / 2016, 09:51:57 »
Given that you want to shoot a variable number of shots, and maybe don't know how many shots until you've actually started shooting, then there is an easy solution for you.

By default,  CHDK already includes four simple scripts  (actually eight as each script is written in both Lua and uBASIC).   If you load the script called interval.lua it will cause the camera to simply start shooting when you press the shutter button to activate it (in <ALT> mode of course).  Shooting stops when you press the shutter button again.

Will that do what you need?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #2 on: 10 / January / 2016, 01:13:04 »
Given that you want to shoot a variable number of shots, and maybe don't know how many shots until you've actually started shooting, then there is an easy solution for you.

By default,  CHDK already includes four simple scripts  (actually eight as each script is written in both Lua and uBASIC).   If you load the script called interval.lua it will cause the camera to simply start shooting when you press the shutter button to activate it (in <ALT> mode of course).  Shooting stops when you press the shutter button again.

Will that do what you need?

Thanks, that's exactly what I needed!

Also, when I select the Bracketing mode, I can press the view button and remove the ALT mode. But for the script to work, I had to be in the ALT mode, and the screen option cover all the screen, so I have to come out of ALT, compose, ALT again and then click pics. However, when I'm NOT using the script but set the bracketing option, I don't need to enable ALT.

Thanks again for your help. I appreciate it.
« Last Edit: 10 / January / 2016, 01:43:09 by ShahJahan »
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.



*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #3 on: 11 / January / 2016, 09:14:18 »
Is there a way to do it outside the ALT mode since the ALT mode options clutter the screen and I have to move in and out of ALT mode for composing and shooting. OR if NOT that, then is there a way to atleast be in the ALT mode but still get the live view on the screen, rather than the CHDK options?!

Thanks again for all your help.

I sincerely appreciate it.
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.




Re: Script for "Press Shutter XX times Loop"
« Reply #4 on: 11 / January / 2016, 09:55:46 »
Is there a way to do it outside the ALT mode since the ALT mode options clutter the screen and I have to move in and out of ALT mode for composing and shooting.
You've hit on one of my pet peeves about CHDK - the annoying "help" screen that is enabled by default.  Fortunately (in some small part due to my protests) you can turn it off.  From the CHDK  Main Menu, go to CHDK Settings and then Menu Settings. The sixth item in that menu says Show <ALT> Help Screen.   Disable that and you will have an uncluttered <ALT> screen.   In the OSD menu,  you might also want to disable the Show OSD setting option.

There is a way to let a script run when you are no longer in <ALT> mode but it's not officially supported as the interactions with the Canon firmware when you do that are not well understood.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #5 on: 12 / January / 2016, 13:43:53 »
You've hit on one of my pet peeves about CHDK - the annoying "help" screen that is enabled by default.  Fortunately (in some small part due to my protests) you can turn it off.
Excellent! Nice that you goaded them into submitting to your (well placed) desire to have a way to turn it off.

From the CHDK  Main Menu, go to CHDK Settings and then Menu Settings. The sixth item in that menu says Show <ALT> Help Screen.   Disable that and you will have an uncluttered <ALT> screen.
I've kept my camera away for some time and I'd test it when I get it out again. But I know that it would work, since I trust your word.

In the OSD menu,  you might also want to disable the Show OSD setting option.

There is a way to let a script run when you are no longer in <ALT> mode but it's not officially supported as the interactions with the Canon firmware when you do that are not well understood.
Oh! Another added bonus! Thanks! That is how helpful you are!

I sincerely appreciate all your help and you have been really helpful.
Thanks again!
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.



*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #6 on: 23 / January / 2016, 10:56:22 »
You've hit on one of my pet peeves about CHDK - the annoying "help" screen that is enabled by default.  Fortunately (in some small part due to my protests) you can turn it off.  From the CHDK  Main Menu, go to CHDK Settings and then Menu Settings. The sixth item in that menu says Show <ALT> Help Screen.   Disable that and you will have an uncluttered <ALT> screen.   In the OSD menu,  you might also want to disable the Show OSD setting option.
I finally got my Camera out yesterday and was able to remove that Help screen. I didn't disable the "show OSD setting" as even without disabling it, I wasn't seeing anything cluttering my screen (what does that OSD show?!)

Also, I choose the Auto Bracketing and in the timer I choose 0 sec, 3 pics for +2 0 -2 shots and now with the interval script I can let it run for several shots. However, the first shot blurs due to my pressing the shutter. Is there a way to delay ONLY the first shot for a sec after pressing shutter? The workaround of 1 sec, 3 pics in timer puts a 1 sec delay for EVERY shot.

BTW, I'm already using the interval script, so can't load more scripts (unless scripts can stack)

Thanks for your help, I sincerely appreciate it.
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.



Re: Script for "Press Shutter XX times Loop"
« Reply #7 on: 23 / January / 2016, 13:10:01 »
(what does that OSD show?!)
Lot's of stuff.  Here's a link to the manual page : OSD Settings

Quote
Also, I choose the Auto Bracketing and in the timer I choose 0 sec, 3 pics for +2 0 -2 shots and now with the interval script I can let it run for several shots. However, the first shot blurs due to my pressing the shutter. Is there a way to delay ONLY the first shot for a sec after pressing shutter? The workaround of 1 sec, 3 pics in timer puts a 1 sec delay for EVERY shot.
Modified script attached.

Quote
BTW, I'm already using the interval script, so can't load more scripts (unless scripts can stack)
One script at a time only.  Although script can load & run other scripts so you could get fancy if you wanted to.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #8 on: 23 / January / 2016, 15:34:39 »
Lot's of stuff.  Here's a link to the manual page : OSD Settings
Thanks. I disabled the OSD and found that it then didn't show things like "EV Bracket", +/-2 Stops, etc. But since it shows that in the corner, I think I'll keep it on. However, now that you've taught me of it, I know from where to disable it if I need to see the corner of my frame if I'm shooting something tight (specially on Macro, and I do a lot of them!)

Modified script attached.
Excellent! I tested it and it worked wonderfully. The best part is, that you programmed it in a way that I can change the initial time. I though it would be hard-set to like 1 or 2 sec (and even that would have been fine) but you made it in a way that I can set the time as per my needs (which is even better) so now I can select the start time to x seconds, depending on my situation!

I've noticed that after every set of 3 pics (0 sec, 3 pics timer; AEB +/-2 stops), it takes one set of pic (3 in this case) and then takes some time before shooting again. I feel it even refocuses. I checked and it was NOT your script as it did so even with the default interval.lua . Is there a way to disable this?! So that it keeps on clicking pics. However, I feel it MAY BE to write the files on the SD Card? Although the delay is not much, but I feel it is still 1-2 secs maybe?

It's still fine, but when I take a set of such pics, I like to to be quick, so as if there is a motion (by winds, or a bird flying) the effect could be reduced if there were no such delay between sets of pics. Again it is NOT something in your script, even the default internal.lua has this delay.

Also, Is there a way to make CHDK remember ALL the settings I previously used? It remembers certain things (like disable Help screen) but it doesn't remember AEB +/-2 Stops, Disable/Enable RAW (previously it was always disabled, until I enabled it. Now with this latest ├četa it is always enabled, until disabled!). I also have to reload the script EVERY time.

I want it to be on the exact same settings as when I left it. EVEN after I turned off my camera. Is it possible?

One script at a time only.  Although script can load & run other scripts so you could get fancy if you wanted to.
I don't know how to do it, but for now, your script works like a charm. So this script will be perfect for me. You are a life saver!

Thanks for your help. I appreciate it.
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.



Re: Script for "Press Shutter XX times Loop"
« Reply #9 on: 23 / January / 2016, 18:03:17 »
I disabled the OSD and found that it then didn't show things like "EV Bracket", +/-2 Stops, etc. But since it shows that in the corner, I think I'll keep it on. However, now that you've taught me of it, I know from where to disable it if I need to see the corner of my frame if I'm shooting something tight (specially on Macro, and I do a lot of them!)
The manual text at the link I posted also tells you how to move the OSD icons to different positions on the LCD and change their font size.

Quote
I've noticed that after every set of 3 pics (0 sec, 3 pics timer; AEB +/-2 stops), it takes one set of pic (3 in this case) and then takes some time before shooting again.
The script just randomly pushed the shutter button over and over and over.  So when the built-in Canon function takes its three shots,  it's random luck when the next set of three shots will start.  It also takes the Canon firmware some time to save the resulting images to the SD card - typically 1 to 2 seconds per shot.

Quote
I feel it even refocuses.
It does.

Quote
I checked and it was NOT your script as it did so even with the default interval.lua .
That's actually "my" script too - not that there is much to it  :P

Quote
Is there a way to disable this?! So that it keeps on clicking pics.
Probably.  I have not played with shooting using Canon's built-in bracketing so I'll take a quick look.  It might be easier to just disable the Canon mode and have the script manage the exposure directly.  You can usually get continuous shooting down below 1 second per exposure that way.

Quote
Also, Is there a way to make CHDK remember ALL the settings I previously used? It remembers certain things (like disable Help screen) but it doesn't remember AEB +/-2 Stops, Disable/Enable RAW (previously it was always disabled, until I enabled it. Now with this latest ├četa it is always enabled, until disabled!). I also have to reload the script EVERY time.
CHDK will remember everything you setup (unless there is a bug in the ports).  It won't remember things setup in the Canon menus though.  But RAW enable and the currently loaded script should be retained between power cycles.

Try this test (assuming you are using SD Card lock booting) :
  • Turn your camera on.
  • Enter <ALT> mode.
  • Select a script by pressing the Func/Set button and then Load Script from File ...
  • Exit <ALT>
  • Enter <ALT>
  • Is the script you picked still selected (as seen in the lower left hand corner of the screen)??
  • Exit <ALT>
  • Power off the camera.
  • Turn your camera on.
  • Enter <ALT> mode.
  • Is the script you picked still selected (as seen in the lower left hand corner of the screen)??
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics