--[[@title Set Zoom@param a Level@default a 0]]if get_zoom() ~= a then set_zoom_speed(100) set_zoom(a) while get_zoom() ~= a do sleep(10) endendexit_alt()
What I do is to focus the object with a zoom, and this is the zoom that I want to save, because when I restart the camera, I want to have this zoom to take the photos.
--[[@title Set Zoom]]print_screen(1)if not autostarted() then file, msg, no = io.open("A/CHDK/ZOOMSETT.TXT", "w") if not file then print("Error " .. no .. ": " .. msg) else ret, msg, no = file:write(get_zoom()) if not ret then print("Error " .. no .. ": " .. msg) else print("Zoom setting = " .. get_zoom()) end end print("Press any key to end") wait_click()else sleep(100) set_record(1) while not get_mode() do sleep(10) end sleep(200) file, msg, no = io.open("A/CHDK/ZOOMSETT.TXT", "r") if not file then print("Error " .. no .. ": " .. msg) else a, msg, no = file:read("*n") if not a then print("Error " .. no .. ": " .. msg) end end if get_zoom() ~= a then set_zoom_speed(100) sleep(100) set_zoom(a) while get_zoom() ~= a do sleep(10) end endend exit_alt()
BTW, I've set up my chdk to boot automatically when I start up the camera, which puts it into play mode anyway.
When I exit play mode by toggling "alt" off and then hitting the shutter button, that's when your script executes.
Started by bdgbill General Chat
Started by acseven General Help and Assistance on using CHDK stable releases
Started by waterman Feature Requests
Started by cocuyo Feature Requests
Started by KenO DSLR Hack development