I think there is an error in code for script command wait_click(0).
This code works:
print(1)
wait_click(10000)
print(2)
This code works not:
print(1)
wait_click(0)
print(2)
The second script should be wait for any key click, but wait_click(0) is ignored. The same with uBasic. I've tested with the recent version of CHDK (rev. 1165) and CHDK-DE (rev. 652).
It is very important to solve this problem. Many scripts in our script collection (German CHDK forum) use this command.
msl