@title CHDKremote2 rem by VP-Systems rem 02-09-2009 while 1 do a = get_usb_power until a>0 if a<3 then gosub "idle" else if a<6 then gosub "focus" else gosub "shoot" endif a=0 wend end :shoot print "shoot:";a press "shoot_full" sleep 1500 release "shoot_full" release "shoot_half" return :focus sleep 300 is_key k "remote" if k=1 then gosub "focuson" else gosub "shoot" return :focuson print "focus on:";a press "shoot_half" return :focusoff print "focus off:";a release "shoot_half" return :idle return return