If you put your camera to MF mode and then start a script that doesn't emulate keypresses to exit MF mode and doesn't call any commands relating to focus (including writing to any propcases relating to focus) and doesn't shut down the LCD or visit PLAY mode, then your focus shouldn't change.
This is what I was trying to accomplish, but can't figure out how to keep the camera from changing the focal length. Technically, I have two problems. I have an interval timing issue and a manual focus issue.
I'm trying to combine the functionality of two scripts that I've found. Program "Intervalometer.bas" has accurate timing on my G9. If it tell it 10 second intervals, that's what it does. Program "intervalometer with day and week" is the functionality I need, but has very erratic intervals on my camera. it jumps all over the place taking pics every 5-7 seconds when set to 10; when set to 4 minutes, it will take two pics within 5-7 seconds every minute. Both programs will throw the manual focus out the window. Weird thing is, the focal length meta data when viewed in windows explorer is always 7mm no matter what. I don't understand why that value doesn't change.
Both scripts use "Shoot" to take the pic. I tried to tweak the day of week program to use "Shoot_half" to lock down the focus once at the beginning and then not change the focus from there using press shoot_full and then release shoot_full, trying to emulate holding the shutter button halfway all the time after the initial focus, but it hasn't worked.
Skywalker9, I found safety MF to be propcase 277 for digicIII cameras. Somewhere in all these wiki searches, I could have swore I found that a G9 was a DigicII, but apparently this was wrong. the listing for that propcase doesn't say whether or not it's a RO or RW, it's blank. I'm guessing it's not been confirmed if it works?
Also, i'm not using the yass code, it was the one that I found the infinity focus lock on...I'd love to use it, but my testing has shown it doesn't lock the focus on my G9, and I really need the day of the week feature more than a morning or evening script
Here's the two programs I"m trying to combine, please take a look and see how I can add the accuracy of "intervalometer.bas" to the functionality of "intervalometer with day and week" and keep that manual focus solid.
Thank you for your thoughts!!!
++++++++++++++++++++++++++++++++++++++++++
intervalometer with day and week
++++++++++++++++++++++++++++++++++++++++++
rem Author - JoeD, based on original script by Keoeeit
rem x-accuracy for delay, j-accuracy for interval
rem Day of week parameters determine what days the camera takes pictures
rem Proper values are from 0-6, with 0 being Sunday and 6 being Saturday
rem Script has not been optimized
x=-1
j=-1755
@title Ultra Intervalometer with Day of Week and Time
@param a Delay 1st Shot (Mins)
@default a 0
@param b Delay 1st Shot (Secs)
@default b 0
@param c Number of Shots (0 inf)
@default c 0
@param d Interval (Minutes)
@default d 0
@param e Interval (Seconds)
@default e 10
@param p Starting Hour (24 Hr time)
@default p 7
@param q Starting Minute
@default q 0
@param r Ending Hour (24 Hr time)
@default r 16
@param s Ending Minute
@default s 0
@param u Day of Week to Start (0 is Sunday, 6 is Saturday)
@default u 1
@param v Day of Week to End (0 is Sunday, 6 is Saturday)
@default v 6
@param
rem sets number of shots already taken to 0
n=0
rem calculates time in ms between each shot
t=(d*600+e*10)*100+j
if c<1 then let c=0
if t<100 then let t=100
rem calculates first shot delay in seconds
g=(a*60)+b+x
if g<=0 then goto "interval"
rem displays seconds left before shooting begins
for m=1 to g
print "Intvl Begins:", (g-m)/60; "min", (g-m)%60; "sec"
sleep 930
next m
goto "interval"
:interval
l=get_time 3
o=get_time 4
y=get_time 5
rem following lines calculate current day of week in variable w, 0 is sunday
if o<3 then gosub "change"
k=(l+(2*o)+(6*(o+1)/10)+y+(y/4)-(y/100)+(y/400)+1)
w=k%7
if w<u or w>v then goto "weekend"
rem calculate time of day, determine if it's in range
i=get_day_seconds
f=(p*3600)+(q*60)
h=(r*3600)+(s*60)
if i<f or i>h then gosub "rest"
n=n+1
if c=0 then print "Shot", n else print "Shot", n, "of", c
shoot
if n=c then shut_down
sleep t
goto "interval"
:change
o=o+12
y=y-1
return
:rest
do
sleep 60000
i=get_day_seconds
until i>=f and i<=h
return
:weekend
i=get_day_seconds
z=(86400-i)
goto "interval"
++++++++++++++++++++++++++++++++++++++++++++++++++++
intervalometer.bas
++++++++++++++++++++++++++++++++++++++++++++++++++++
rem author Divalent, based on my "simple intervalometer" script previously posted
rem (which in turn was based on the ONMI intervalometer of Keoeeit)
rem Camera: S3, and other Digic II camera's
rem CHDK version: Fingalo's versions v106 or later
rem (must have get_tick_count and get/set prop)
rem
rem Note: this intervalometer only shoots in photo mode (not video or burst)
rem
@title Accurate Intervalometer
@param a Number of Shots
@default a 180
@param e Interval (Mins)
@default e 0
@param f Interval (Secs)
@default f 2
@param g Interval (0.1 Secs)
@default g 0
@param h image size (0,1,2,4,5)
@default h 4
if e<0 then e=0
if f<0 then f=0
if g<0 then g=0
rem TURN RAW OFF! (this is my preference. You can delete)
set_raw 0
rem Turn NR off. (I usually have this off, but just in case)
set_raw_nr 1
rem ensure # of shots more than 1
if a<2 then a=2
rem d = user specified cycle time (in 0.1 sec units)
d=e*600+f*10+g
rem now convert d to msecs (same units as get_tick_count uses)
d=d*100
if d<1 then d=1
rem ======== Digic III cameras, remove this section =========
rem, get jpg Image quality (= 0,1,2 from best to worst)
rem get_prop 23 i
rem explicitly set quality to best
rem set_prop 23 0
rem, get image size 24 = 0, 1, 2, 4, 8 for L, M1, M2, S, W
rem get_prop 24 j
rem, check image size variable, force to a valid number
rem if h<0 then h=0
rem if h>4 then h=8
rem if h=3 then h=4
rem set_prop 24 h
rem ======== end of Digic II camera-specific section =========
n=1
rem start with initial pause of 1 sec
sleep 1000
t=get_tick_count
shoot
sleep 100
print "Shot", n, "of", a
rem now we've done the first shot. do the rest
for n=2 to a
s=t+d
:wait_loop
t=get_tick_count
if t<s then goto "wait_loop"
shoot
sleep 100
print "Shot", n, "of", a
next n
rem, restore 23 & 24 Image quality and size
set_prop 23 i
set_prop 24 j
end