although i will test caefix idea tomorrow I am not convinced the problem is in the script
FWIW, I frequently find caefix's posts and code difficult to understand, and to the extent I understand the code, it often seems convoluted, unrelated to the question at hand or just incorrect. I don't mean this to flame caefix, just a caution that you may not want to spend much time on it if what they post doesn't make sense to you.
prove me wrong: can you explain how a script that does nothing with focus and the cam is set in MF the same change of focus happens? (see log)
Which log, the one on
this post? What specifically does it show?
If you want help, it's in your interest to explain, as clearly and simply as you can:
1) What specific steps you took
2) What specifically happened
3) How what happened differed from what you expected
A minimal script is a good way of accomplishing #1, but
or why the results are also changing when using CHDK's "Override Subject Distance"?
If there is simple, step by step instruction to reproduce the problem using just menu options, that's fine too.
It sounds like your complaint is that subject distance reported by get_focus() changes between shots, in MF mode, regardless of CHDK overrides?
I've seen small changes after shooting, like setting the distance to the last step before INF and having it show INF after shooting. I've also seen it change on switching to play back. IMO, this is normal behavior, but I'm not clear if it is what you are talking about.
One other thing to note is that the specific get_focus values that result from a set_focus call are limited, and not consistent over time. For example, on my g7x, set_focus(170000) might result in a get_focus of 217323 or 195245, if it's 217323 on a given day, then setting 195245 is impossible (and vice versa).