Thanks for your insights
and thanks for yours.
Because of that, I am now testing a new uBasic command 'set_focus_range'.
When that command runs, it waits for you to press the left or right key to change focus, even if the camera does not have manual focusing mode.
(my A620, and various other cameras, HAS to be in manual focusing mode though).
Press SET to save nearpoint and repeat for farpoint.
Command then finishes and the values are made available to the focus-stacking command.
(Incidentally, the SDM auto focus-stack is a built-in bracketing feature, it is not a script).