This is basically a very fast and responsive motion detection script. This will definitely solve your problems if you want to catch lightning (thus the title) or anything fast, however some objects will blur when the light conditions are insufficient. Enjoy this script!

Doesn't works on: A560 (freeze camera, You need to remove batteries to make it work again), A720 IS (I tested it with allbest firmware and works!) and some others ; Update 7/02/2009 : With the latest version of CHDK ( autobuild ) , verison B for PowerShot S5IS it causes camera crash. update 4/03/2011 Tested on SX200IS, freezes camera on load, takes one picture then have to remove batteries and delete script.