@title ServoRemote @param f Fotomodus (2,22,23,61,73) @default f 2 @param v videomodus (2,79) @default v 2 set_record 1 set_capture_mode f m = 1 a = 0 :loop if (m = 1) and (a > 1000) then print "keep alive" click "shoot_half" endif w = get_movie_status if (m = 2) and (w <> 4) then print "video stopped autom." gosub "video" endif if (m = 1) and (w = 4) then print "video started autom." gosub "video" endif s = 0 a = 0 do if is_pressed "set" then end endif a = a + 1 p = get_usb_power until (p > 0) or (a > 1000) if (a >= 10) and (a <= 1000) then b = 0 do b = b + 1 q = get_usb_power until (q > 0) or (b > 10) if b <= 10 then c = 0 do c = c + 1 r = get_usb_power until (r > 0) or (c > 10) if c <= 10 then i = p / 5 j = q / 5 k = r / 5 s = i * 2 + j * 4 + k * 8 rem print p"("i")"q"("j")"r"("k") "s rem print a"-"b"-"c endif endif endif select s case 2; gosub "bild" case 4; gosub "video" case 6; gosub "zoomin" case 8; gosub "zoomout" case 10; gosub "add1" case 12; gosub "add2" end_select if is_pressed "set" then end endif goto "loop" :bild if m = 1 then print "bild -> shoot" shoot sleep 5000 endif if m = 2 then print "bild -> abort video" gosub "video" endif return :video w = get_movie_status if m = 2 then m = 1 if w = 4 then print "video -> stop" click "video" sleep 5000 set_capture_mode f else print "video -> alr. stopped" set_capture_mode f endif else if m = 1 then if w < 2 then m = 2 print "video -> start" set_capture_mode v sleep 500 click "video" sleep 5000 else print "video -> no start" rem click "video" rem sleep 5000 set_capture_mode f endif endif endif return :zoomin print "zoom in" set_zoom_rel 12 return :zoomout print "zoom out" set_zoom_rel -12 return :add1 print "add1" return :add2 print "add2" return