How do I get the camera to focus before shooting with a usb remote? Is it sufficient that I do it manually with a half-way shutter press before pressing the trigger with the remote cable? Or is this something that should be added in the script?
The link that @waterwingz provided may seem a bit complicated if you are new to using a USB remote with CHDK so I'll add a little more info. Manually pressing the shutter button half-way before starting a script will only work if you can "lock" the focus before starting the script such as with some of the cameras that have a manual focus (MF) capability
and the script doesn't change the condition before taking a shot. Since you mentioned you are using a script, it is simple to incorporate a statement (if not already present) that performs a "half-way shutter press". Many of the scripts available on the CHDK site have the statement already incorporated. For example, if you are using a BAS script, the statement would be a
press "shoot_half"; in a LUA script the statement would be a
press("shoot_half"). Hope this helps!