there is nothing to "twist around a bit"; focusandtakepicture is a method
in the camex class.
and pressing a button to take a picture can also be automated if you can't
get your head around focusandtakepicture. but it is a slightlly different
approach, although the end result can be the same either way. try both.
they both involve setting a timer. (you are aware that you can cause a
button to click programatically, right?)
examples are meant to be modified. i don't know where you stand
with your camera app. if you have a camera app example that you're
working with, the odds are you also have the camex class. no need to
go looking for it. if you're starting from scratch, just copy and paste
the camex class from some example into your app. or modify the
example to suit your needs. i still use the same basic camera example
with erel's camex class from years ago. i just modify as needed. sometimes
i use user action, sometimes focusandtakepicture, sometimes capturing
frames from the preview. but the camera setup is through the camex class.
after the camera is ready, you set a timer for, eg, every 10 seconds. when the
timer runs down, it raises its "tick" event. in the tick event, you call
focusandtakepicture or button1_click. your call. after that occurs, you start the
camera preview, and enable the timer again, ad nauseam:
dim timer1 as timer (in process_globals)
timer1.initialize("timer1",10000)
timer1.enabled = false
'once camera is ready
timer1.enabled = true
sub timer1_tick
timer1.enable = false
camex.focusandtakepicture (or you could call button1_click if you have such a button)
' do whatever else you want...
camex.startpreview
timer1.enable = true
end sub
sub button1_click
camex.takepicture
end sub
sub activity_pause
camex.release
timer1.enabled = false
end sub
note: you need to set the focus depending on whether you're going to use focusandtakepicture
or button1_click. they work differently.