Script for "Press Shutter XX times Loop" - page 2 - Script Writing - CHDK Forum
supplierdeeply

Script for "Press Shutter XX times Loop"

  • 18 Replies
  • 3739 Views
*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #10 on: 24 / January / 2016, 04:21:11 »
Advertisements
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.
Thanks, however, since the default position is pretty non-intrusive (upper left corner) for my Tv bracketing settings, I'm keeping them as default. However, it's nice to know that I can change it, if I want to.

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.
Yeah, even I thought that the wait might be for saving images on SD Card and the wait is NOT much generally, specially if I'm NOT shooting RAW.

Quote
I feel it even refocuses.
It does.
Is there a way to disable it?! If I'm stacking my shots, I don't need it to refocus once after every three shots. Although, since its autofocus is pretty damn fast (compared to my Fujifilm FinePix S8500, which is dead slow!) I can live with it. However, if there is a way to disable auto-focus, then it would be nice. Since it DOESN'T auto-focus everytime when I'm shooting Tv AEB (Auto Exposure Bracketing). It focuses just once, then shoots 3 (or as many as I want in the series) without focusing again. However, if I'm using interval.lua or manually press shutter, it refocuses again for EVERY series.

That's actually "my" script too - not that there is much to it  :P
Wow! Your script comes bundled with CHDK?! That's quite an accomplishment Sir. Nice to be in touch with one of the developers of this neat software.

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.
I found a way to make it remember the AEB settings. (This is really stupid of me!) On the same screen where the AEB settings rest, below the Tv, Av, ISO there is an option to "Disable Bracketing on Startup" and it was selected. I unchecked it and now it can remember my AEB Settings!

However, I need to go to timer settings (on the camera, NOT CHDK) and then again select Manual Timer > Custom > 0 Sec, 3 Pics (or whatever).

I wish it can remember that I used the timer before and loads it with the timer selected, so that I don't have to do it 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)??
Nice, now it can remember my settings, I don't know how or what I changed (I was playing with the settings, and also found that "Disable Bracketing on Startup" and things like that) which I changed. I don't know what else I changed, but now it does remember my settings, Save/not RAW, Tv AEB with Stops I previously used, Script with start delay I last used. So now my camera is fully automated, almost. Now the only thing I need to do is, manually load CHDK everytime (any way to automate it so that it loads auotmatically everytime, unless I remove the CHDK from the SD Card?) and to Select the Timer options again for my AEB Bracketing to work.

I've now already improved my speed to several times faster, as I've already automated pretty much everything (all thanks to you) and also improved image quality as now I don't have to press shutter everytime and cause motion blur or slight motion if shooting handheld (again thanks to your interval.lua)

Now if only CHDK can load itself everytime I press power button and if Timer mode is auto selected, I would be COMPLETELY automated!

Thank you once again my dear friend. You have been very helpful. 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 #11 on: 24 / January / 2016, 21:36:42 »
Hmmmm ..  I posted a reply to this 12 hours ago but it seems to have disappeared. Strange.

Quote
I feel it even refocuses.
It does.
Is there a way to disable it?!
Updated script attached.

Quote
I wish it can remember that I used the timer before and loads it with the timer selected, so that I don't have to do it every time.
Saving and restoring Canon settings with CHDK is quite difficult.  Especially self timer settings.  Sorry.

Quote
Now the only thing I need to do is, manually load CHDK everytime (any way to automate it so that it loads auotmatically everytime, unless I remove the CHDK from the SD Card?) and to Select the Timer options again for my AEB Bracketing to work.
What?  There are two ways to load CHDK - the "firmware update" method and the "Card Lock Autoboot" method.  The later causes CHDK to load every time the camera is powered on.  I'm surprised you have come this far and not noted that.

The only complete and correct description of that is here :  Prepare Your SD Card : Bootable SD Card Method

If you use the STICK Utility linked at the top of that page it will automatically setup the SD card correctly for autobooting.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #12 on: 25 / January / 2016, 12:11:25 »
Hmmmm ..  I posted a reply to this 12 hours ago but it seems to have disappeared. Strange.
:o How much I hate when it happens! To post a huge reply and then it disappears OR lose internet connection OR Website down!

Sorry for going through it again for me, but I appreciate it.

Updated script attached.
I tested it with both ticking and unticking the lock focus thing and I think it still focuses. To confirm, I tested by clicking a pic of something less than a foot away (but NOT in macro range) and then moving back 6 feet and yet all the images were focused, so I think it still focuses.

But it is alright though, since the auto-focus is pretty darn fast, I can live with it. So now I'm reverting back to the first interval.lua (the one with start timer, but NO Focus Lock)

Saving and restoring Canon settings with CHDK is quite difficult.  Especially self timer settings.  Sorry.
It's alright, I'll do it every time.


What?  There are two ways to load CHDK - the "firmware update" method and the "Card Lock Autoboot" method.  The later causes CHDK to load every time the camera is powered on.  I'm surprised you have come this far and not noted that.

The only complete and correct description of that is here :  Prepare Your SD Card : Bootable SD Card Method

If you use the STICK Utility linked at the top of that page it will automatically setup the SD card correctly for autobooting.
Now I feel really stupid again, for NOT knowing it already. Perhaps a simple Google search could have saved me the embarrassment!

Anyways, I tried 2 methods, I used the STICK app and then when it didn't work, I used the manual method. I did this with BOTH the stable and the latest 1.5 ├četa builds but everytime I would get the same error
""ERROR. MISSING MODULES" (on upper left in red font)
"Memory Card Error" (in the middle of the screen)

The CHDK does load when I power on the Camera (using the Power button, with the card locked), but after the Splash Screen shows the above error.

Both methods yield the same error. I googled and found that there were others too who had this error. My googling lead me to this YouTube video, where one commented about having the exact same error. He even mentioned having the same camera as mine - Canon PowerShot SX160 IS. I did NOT search with my cam model, yet the result showed that cam model, so perhaps it has something to do with the camera?

So I guess this the the most automated I can get? I'll just have to manually update the firmware to CHDK, and then set the timer. I've already cut a lot of time in my configuration and now I'm pretty much satisfied. I wish atleast the CHDK would load automatically, as it is the most labor and time-intensive! The timer could have been alright then!

Still, I thank you once again in all sincerity!
My appreciations. Thank you!
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 reyalp

  • ******
  • 12218
Re: Script for "Press Shutter XX times Loop"
« Reply #13 on: 25 / January / 2016, 13:09:40 »
Both methods yield the same error. I googled and found that there were others too who had this error. My googling lead me to this YouTube video, where one commented about having the exact same error. He even mentioned having the same camera as mine - Canon PowerShot SX160 IS. I did NOT search with my cam model, yet the result showed that cam model, so perhaps it has something to do with the camera?
My sx160 autoboots just fine. Since this is a modern camera, you should NOT use a multi-partition card. If you have tried partitioning at some point, you might want to go back and do a fresh format.

The missing modules errors means that CHDK can't find the .flt files that are supposed to be in CHDK/MODULES

Either they aren't there, or you created a multi-partition card when you should not have, or something else is preventing CHDK from accessing the files.
« Last Edit: 26 / January / 2016, 02:39:14 by reyalp »
Don't forget what the H stands for.


Re: Script for "Press Shutter XX times Loop"
« Reply #14 on: 25 / January / 2016, 14:57:10 »
I tested it with both ticking and unticking the lock focus thing and I think it still focuses. To confirm, I tested by clicking a pic of something less than a foot away (but NOT in macro range) and then moving back 6 feet and yet all the images were focused, so I think it still focuses.
I tested the script changes on my G10 and Powershot N and the focus lock worked on both.  Did you have the camera in P mode and continuous & servo autofocus turned off?

Quote
Anyways, I tried 2 methods, I used the STICK app and then when it didn't work,
STICK has worked for many hundreds of CHDK users.  What did you see that makes you think it does not work?

Quote
My googling lead me to this YouTube video, where one commented about having the exact same error. He even mentioned having the same camera as mine - Canon PowerShot SX160 IS. I did NOT search with my cam model, yet the result showed that cam model, so perhaps it has something to do with the camera?
That video contains a lot of inaccurate information about CHDK.  As usual with many youtube videos,  the author spent 10 minutes reading some obsolete installation information and then felt qualified to make an instructional video.  I contacted him directly pointing out the flaws - he didnt' care.

Quote
So I guess this the the most automated I can get?
No it's not.  As reyalp points out above, the SD Card Lock autoboot will work with your camera.  You just have to figure out what step(s) you have missed.  Telling us more about how STICK worked for you would be a good start.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #15 on: 26 / January / 2016, 02:17:36 »
My sx160 autoboots just fine. Since this is a modern camera, you should NOT use a multi-partition card. If you have tried partitioning at some point, you might want to go back and do a fresh format.

The missing modules errors means that CHDK can't find the .flt files that are supposed to be in CHDK/MODULES

Either they aren't there, or you create a multi-partition card when you should have, or something else is preventing CHDK from accessing the files.
I NEVER partitioned the card and the formatting was ALWAYS done inside the camera using the "Low Level" format option with the card UNlocked. Then switched off the camera and put the card in my Card Reader.

I ran the STICK utility again using the technique stated below and AFTER it AGAIN showed error, I checked the Modules folder in card and it has all the .flt files.



I tested the script changes on my G10 and Powershot N and the focus lock worked on both.  Did you have the camera in P mode and continuous & servo autofocus turned off?
I ALWAYS shoot in the M mode, however, for the focus, I chose "Normal Focus". The other focusing options are Macro and Manual. Except for Manual, the camera auto focuses in Normal or Macro. I tested ONLY with Normal Focus, BUT in M Mode.

That video contains a lot of inaccurate information about CHDK.  As usual with many youtube videos,  the author spent 10 minutes reading some obsolete installation information and then felt qualified to make an instructional video.  I contacted him directly pointing out the flaws - he didnt' care.
I did NOT follow that video, didn't even watch it. I only googled and it pointed me to that comment where another guy with SX160 IS also faced the same error as mine.

STICK has worked for many hundreds of CHDK users.  What did you see that makes you think it does not work?
No it's not.  As reyalp points out above, the SD Card Lock autoboot will work with your camera.  You just have to figure out what step(s) you have missed.  Telling us more about how STICK worked for you would be a good start.
MS Windows 10 Single Language Home License 64 bit
4GB RAM, AMD Phenom II X4 Quad Core 3.2 GHz

8 GB microSD Card, in a card adapter (UNlocked position) formatted in Camera with Low Level format selected

I ran the STICKX.CMD (since when I run it from the stick.jar, it gives me an error, "STICK needs permission to analyse disk")
Googling showed me this result which said,
Quote
On a 64-bit system and on some 32-bit systems, even if you are logged on as an Admin, you will have to start STICK using STICKX.CMD, otherwise STICK will not be able to analyse your card. It should display a message like this:

   STICK needs permission to analyse disk

and the log will contain a message like this:

   Failure checking device '\\.\PHYSICALDRIVE2' - error 5

If you see this message, or are running a 64-bit Windows system, terminate STICK and double-click the STICKX.CMD file. This will display a dialog allowing you to temporarily 'elevate' yourself to Admin level by selecting a user account with these privileges. STICK will then run properly.

Unfortunately this temporary elevation breaks drag-and-drop (it's a known Windows problem) so you will have to use the Browse button to locate a photo.


I Used the radio button Development 1.4 CHDK
Drag and Drop photo NEVER worked for me so I click browse and select a photo from my image gallery (NOT on the camera, but my PC!)


Then I clicked on Download


Then I clicked on Scan for Cards?


It detected my Card in my USB Card Reader G Drive

Then I clicked on Continue to Install Step

Then I clicked on install CHDK


Then I clicked on "Safely Eject Card"


Now I put the microSD in the Adaptor, moved the slider into LOCKED position and put the card in camera
Booted using the Camera Power (On/Off) button
Flashes the CHDK logo then, ERROR: MISSING MODULES on upper left screen
Memory Card Error (in the middle of the screen)
Memory Card Locked (flashes for a sec or two in the lower center of the screen)

Log File attached, kindly check.
« Last Edit: 26 / January / 2016, 02:28:10 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 reyalp

  • ******
  • 12218
Re: Script for "Press Shutter XX times Loop"
« Reply #16 on: 26 / January / 2016, 02:53:27 »
Now I put the microSD in the Adaptor, moved the slider into LOCKED position and put the card in camera
Booted using the Camera Power (On/Off) button
Flashes the CHDK logo then, ERROR: MISSING MODULES on upper left screen
Memory Card Error (in the middle of the screen)
Memory Card Locked (flashes for a sec or two in the lower center of the screen)
This is definitely not normal.  The Card Error and Card Locked messages are from the Canon firmware. With CHDK running, the card locked message should never show, since CHDK hides the lock state  :blink:

I confirmed that the 1.5.0-4379 autobuild works fine on my sx160.

Have you tried a different card or a different adapter? It's possible that the switch in the camera which is supposed to detect the lock isn't working correctly, or that it doesn't work with this particular card.

edit:
this may be related http://chdk.setepontos.com/index.php?topic=11487.0
I have never seen this problem on my sx160.
« Last Edit: 26 / January / 2016, 03:04:09 by reyalp »
Don't forget what the H stands for.

*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: Script for "Press Shutter XX times Loop"
« Reply #17 on: 26 / January / 2016, 04:26:54 »
This is definitely not normal.  The Card Error and Card Locked messages are from the Canon firmware. With CHDK running, the card locked message should never show, since CHDK hides the lock state  :blink:

I confirmed that the 1.5.0-4379 autobuild works fine on my sx160.

Have you tried a different card or a different adapter? It's possible that the switch in the camera which is supposed to detect the lock isn't working correctly, or that it doesn't work with this particular card.

edit:
this may be related http://chdk.setepontos.com/index.php?topic=11487.0
I have never seen this problem on my sx160.
FINALLY got it to work!

My Kingston 8GB Class 4 Card does NOT work, but my Strontium 32GB Class 10 Nitro Series Card DOES work. I don't know if this is because the 8GB card is slower, or perhaps because the Nitro Series came with the adapter and since this adapter is for THIS card (came with it!) hence it worked?! Whatever it was, I'm now happy that it is working.

Now, I'm really upto speed! Now my card is faster, so I can now shoot RAW. My 8GB card was so slow that it would take SEVERAL seconds to write RAW on the card. And since I ALWAYS shoot AEB +2 0 -2 and several times for same shot, I was forced to disable RAW (something I hated myself for doing). Now, I can shoot RAW. Perhaps I'd like to shoot raw ONLY. I'd now google to see if I can disable JPG and shoot RAW only! I hope I can! (The reason I didn't use 32GB was because I was using 32GB in my phone, which I use everyday, and my Cam I use just once in a while, so put my 8GB Mobile Card in cam, now I'd just buy another 32GB for mobile!)

Anyways, thank you EVERYBODY for your invaluable help! You'll have REALLY shaved off several seconds in my preparations and now I only need to set timer, and rest ALL is automated!

Thank you once again, I sincerely appreciate it.

PS: I'm really happy now, you can see the joy on my face!
Thank you once 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.




Re: Script for "Press Shutter XX times Loop"
« Reply #18 on: 26 / January / 2016, 06:42:26 »
You can't shoot RAW only.  Sorry.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics