I am new to CHDK...I am trying to do what should be the simplest of operations: turn on camera, zoom out lens to a set point, and take a picture...something like this:rem Author ~Keoeeit~rem For S-series cameras ONLY!set_zoom_speed 20set_zoom 0set_zoom 1click "shoot_half"shootend...The behavior is flakier than a croisant...Sometimes it will actually get to the shoot command, but the zoom is all wrong...I've tried all sorts of sleep 100, sleep 500, sleep 6000 throughout the script to no avail...
rem Author ~Keoeeit~rem For S-series cameras ONLY!set_zoom 1sleep 1000press "shoot_half"sleep 1000shootrelease "shoot_half"end
To add further to my investigation, I can in fact get set_zoom to work in an autostart script, BUT the only way I have found to do so is to have a shoot command somewhere prior to my first set_zoom command. Further, if I want to keep the camera from shutting off after the set_zoom, then I need to do something like press/release "shutter_half" or shoot or whatever. If you have set_zoom and then end OR even if you have set_zoom x, sleep y, end, the camera (at least my A480) will always shut down at the end of the autostart script.I'm ready to call this a bug and not an error on my part. I think anyone using set_zoom in an autostart script does so at their own peril. Please feel free to correct me if I'm missing something here.
rem Test@param a Zoom Step@default a 50 cls print "Set when ready..." print " ":check_again wait_click is_key k "set" if k=1 then goto "ok" goto "check_again":ok set_zoom a sleep 1000 press "shoot_half" sleep 1000 shoot release "shoot_half"end
...press "shoot_half" sleep 1000 shoot release "shoot_half"...
shoot
press "shoot_half"press "shoot_full"release "shoot_full"release "shoot_half"
@SkyWalker9Why do you use this code?Code: [Select]...press "shoot_half" sleep 1000 shoot release "shoot_half"...shoot includes shoot_halfEitherCode: [Select]shootorCode: [Select]press "shoot_half"press "shoot_full"release "shoot_full"release "shoot_half"And you must check the max. zoom steps of a camera. Not all cameras have 50 or more steps. Use get_zoom_steps.msl
Started by xylene2301 Script Writing
Started by yardleydobon LUA Scripting
Started by gabriele.forni RAW Shooting and Processing
Started by Bernd R Feature Requests
Started by waterwingz General Discussion and Assistance