--[[ ******************************** Licence: GPL (c) msl 2012/05/09 ******************************** @title Video extended @param a Auto (re)start [1] @default a 1 @param b Time in s 0=max @default b 0 ]] function StartStopVideo() local rec, vid = get_mode() local vid_button = get_video_button() -- get_video_button() available changeset 1829 if rec == true and vid == true and vid_button == 0 then press("shoot_full") sleep(300) release("shoot_full") elseif rec == true and vid_button == 1 then click("video") end end function restore() if get_movie_status() == 4 then StartStopVideo() end cls() set_console_layout(0,0,25,5) set_console_autoredraw(1) end if a<0 or a>1 then a=0 end if b<0 then b=0 end restart = a record_time = b BL=0 TC=false time_start = 0 time_now = 0 set_console_layout(9,1,39,6) if restart==1 then cls() print("Automatischer (Re)Start") if record_time > 0 then print("Aufnahmezeit:", record_time, "s") end sleep(2000) end set_console_autoredraw(0) while true do if TC == false and record_time > 0 then time_start = get_tick_count() TC = true end cls() if restart ~= 1 then print("[SET] Start/Stopp Video") end print("[DISP] An/Aus Backlight") print("[MENU] Ende") console_redraw() wait_click(900) if is_pressed("display") then set_backlight(BL) if BL == 1 then BL=0 else BL=1 end end if is_pressed("set") and restart ~= 1 then StartStopVideo() end if is_pressed("menu") then restore() break end if TC == true and record_time > 0 then if get_tick_count() - time_start >= record_time * 1000 + 2000 then StartStopVideo() -- stop video TC = false end end status = get_movie_status() if (status < 4 or status > 4) and restart == 1 then StartStopVideo() cls() print("Start Aufnahme") console_redraw() sleep(5000) if BL == 1 then set_backlight(0) end end end