--[[ @title Z-Shoot @param a wait shoot x 0,1 s @default a 1 @param b zoom time x 1 s @default b 5 ]] function get_zoom_time() local time1 = get_tick_count() set_zoom(max_zoom) local time2 = get_tick_count() - time1 + 250 set_zoom(0) return time2 end function zoom_shoot(tv) set_tv96_direct(tv) press("shoot_half") repeat sleep(10) until get_shooting() == true press("shoot_full") sleep(wait) set_zoom(max_zoom) release("shoot_full") release("shoot_half") repeat sleep(10) until get_shooting() ~= true set_zoom(0) end function print_tv(nn) local tv_output = {"64","50","40","32","25","20","15","13","10","8","6","5","4", "3.2","2.5","2","1.6","1.3","1.0","0.8","0.6","0.5","0.4","0.3","1/4","1/5", "1/6","1/8","1/10","1/13","1/15","1/20","1/25","1/30","1/40","1/50","1/60", "1/80","1/100","1/125","1/160","1/200","1/250","1/320","1/400","1/500", "1/640","1/800","1/1000","1/1250","1/1600","1/2000","1/2500","1/3200", "1/4000","1/5000","1/6400","1/8000","1/10000"} if (nn +19) > table.getn(tv_output) or (nn +19) < 1 then return "n/a" else return tv_output[nn +19] end end function restore() cls() set_zoom(0) set_console_autoredraw(1) end --start script if a < 1 then a = 1 end wait = a*100 if b < 1 then b = 1 end zoom_time = b*1000 finish = 0 tv = -160/32 max_zoom = get_zoom_steps()-1 set_console_autoredraw(0) if get_mode() == true then if get_zoom() ~= 0 then set_zoom(0) sleep(zoom_time) end repeat cls() print("[\26] get zoom time") print("zoom time:",zoom_time,"ms") print("[SET] zoom shoot") print("[\18] ", print_tv(tv)) print("[MENU] end") console_redraw() wait_click(0) if is_pressed("right") then zoom_time = get_zoom_time() elseif is_pressed("set") then zoom_shoot(tv * 32) elseif is_pressed("up") then tv = tv - 1 elseif is_pressed("down") then tv = tv + 1 elseif is_pressed("menu") then finish = 1 end until finish == 1 else print("no record mode") sleep(2000) end restore()