Also worth noting for anyone else reading, the function names may vary on on other models.
I've been playing with this for CHDK 1.2.0. Except for a few cams that crash in MF mode, it should put most of the rest into MF mode if set_aflock() is not working for you.
function enable_mf()
if call_event_proc("SS.Create") ~= -1 then
if call_event_proc("SS.MFOn") == -1 then
if call_event_proc("PT_MFOn") ~= -1 then
if get_prop(props.FOCUS_MODE) ~= 1 then post_levent_for_npt("PressSw1AndMF") end
end
end
elseif call_event_proc("RegisterShootSeqEvent") ~= -1 then
if call_event_proc("PT_MFOn") == -1 then
if call_event_proc("MFOn") == -1 then
if get_prop(props.FOCUS_MODE) ~= 1 then post_levent_for_npt("PressSw1AndMF") end
end
end
else
if get_prop(props.FOCUS_MODE) ~= 1 then post_levent_for_npt("PressSw1AndMF") end
end
if (get_prop(props.FOCUS_MODE) == 1 ) then print("MF enabled") else print("MF enable failed") end
end