If you tape-down the power button and use a battery-operated PIR (passive infra-red) detector to connect an external power-source to the camera, the camera will then boot.
An autostart script can then take a photo.
There will be a few seconds delay.
Cannot remember if you can power-down the camera from a CHDK script.