Pls pardon my ignorance, at what point does the script run? Right after I click "load script" from CHDK menu? Where does the output of 'print' go? Looking at script, something has to be printed on the screen, but I see nothing on Powershot N's touchscreen.
The script menu just loads the script. The script should run when you press the shutter in "alt" mode, though it's possible touch screen cameras do something differently.
My suggestion was to use a simple script with just
set_mf(1)
set_focus(-1)
If you shoot after running that, the focus should be at infinity. Put it in a file named focus.lua or something like that.