@title MD Objektfoto AF @param a Anzahl Spalten @default a 3 @param b Anzahl Zeilen @default b 3 @param e Vergleichsintervall ms @default e 7 @param f Schwellwert 0-255 @default f 5 @param j Maske linke Spalte @default j 2 @param k Maske obere Zeile @default k 2 @param l Maske rechte Spalte @default l 2 @param m Maske untere Zeile @default m 2 @param o Pixel Step @default o 6 @param r Reviewzeit Sek. @default r 0 @param w 0=Aufnahme,1=Autoschwellwert @default w 0 @param x max. Zahl Aufnahmen @default x 100 if a<1 then a=1 if b<1 then b=1 if f<1 then f=0 if f>255 then f=255 if j<0 then j=0 if j>a then j=a if k<0 then k=0 if k>b then k=b if la then l=a if mb then m=b if r<0 then r=0 if x<1 then x=1 e=6 r=r*1000 :FlashWarning P=get_flash_mode if P=2 then goto "MFWarning" print "!!! Blitz noch aktiv !!!" goto "ScriptAbort" :MFWarning P=get_focus_mode if P=0 then goto "FaceDetWarning" print "!!! Manueller Fokus !!!" print "!!! noch aktiv !!!" goto "ScriptAbort" :FaceDetWarning if get_propset > 1 then P=get_prop 8 if P=1 then goto "SkipWarnings" print "!!! AiAF oder !!!" print "!!! Gesichtserkennung !!!" print "!!! noch aktiv !!!" goto "ScriptAbort" endif :SkipWarnings if w=1 then gosub "treshold_adj" N=0 W=0 A=0 do cls print "*** Objektfoto AF ***" print "Anzahl Aufnahmen :", N print "Wiederholungen AF:", W print "Abbrueche AF :", A h=0 do release "shoot_half" press "shoot_half" do P=get_shooting until P=1 md_detect_motion a, b, 1, 300000, e, f, 1, h, 1, j, k, l, m, 0, o, 500 until h>0 F=0 :AFLoop release "shoot_half" press "shoot_half" do P=get_shooting until P=1 if get_propset = 1 then P=get_prop 67 else P=get_prop 18 endif if P>0 then press "shoot_full" if P>0 then N=N+1 if P>0 then goto "AFOK" F=F+1 W=W+1 if F>2 then A=A+1 if F>2 then goto "loop_end" goto "AFLoop" :AFOK sleep r release "shoot_full" do P=get_shooting until P<>1 :loop_end until N=x :treshold_adj cls print "*Schwellwerteinstellung*" P=0 N=0 f=0 :treshold_loop h=0 release "shoot_half" press "shoot_half" sleep 1000 md_detect_motion a, b, 1, 1000, e, f, 1, h, 1, j, k, l, m, 0, o, 500 if h>0 then N=N+1 T=0 print "Schwellw./Trigger", f, "/", N f=f+1 else T=T+1 endif if T>5 then goto "AdjComplete" goto "treshold_loop" :AdjComplete cls print "Schwellwert =", f print "hoch => wiederholen" print "runter => weiter" print "rechts => +1; links => -1" wait_click 0 if is_key "up" then goto "treshold_adj" if is_key "down" then return if is_key "right" then f=f+1 if is_key "left" then f=f-1 goto "AdjComplete" :ScriptAbort end