Hi Mark,
I made this script for my SX50.
If you want to stop the script before "infinity focus" just press "shoot" again.
The camera has to be in Manual Focus mode.
Attached is an example of a stack made with the SX50 combined with a Raynox MSN202 (no crop)
BR
Leif
rem Focus bracketing
rem s focus distance
rem f focal length
rem a fnumber
rem c circle of confusion
@title SX50 Focus bracketing by Leif Karlsson
@param p Max number of steps
@default p 300
@default c 5
sleep 2000
for r=1 to p
shoot
get_focus s
get_zoom f
get_av n
a=100*(s-f)/(f+n*c)
b=100*2*s*f/(f*f+s*n*c-n*c*f)
d=a*b/10000
g=s+d/8
set_focus g
print g,d
if g>50000 then r=p
if d<0 then r=p
next r
end