Almost, but not quite. First, the propset 1 prop should be 40, not 69 (user tv). And after that, the above is better done this way nowadays:
props=require "propcase"
set_prop(props.TV,0)
shoot()
But this is no good because it only works in Tv mode (and in M mode in those cameras in which M mode is a combined Av+Tv mode, not a modified P or AUTO mode).
To really change Tv in any mode, one should use the "Tv for next shot" propcase (69/262), which must be set after autoexposure if it's enabled. Some of Allbest's set_tv* commands probably do this but they're poorly documented and have/had bugs at 1 second tv and I still haven't had the motivation to figure them out from the source. So I suggest this instead:
props=require "propcase"
-- 1 second Tv:
tv=0
-- 0.5 second Tv:
-- tv=96
press("shoot_half")
repeat
sleep(1)
until get_shooting() == true
set_prop(propcase.TV, tv)
press("shoot_full")
Note: All these propcases take tv96 (96 per full Ev stop, centered at 0==1 second, positive==faster exposure). There's an old script command set_tv which uses enumerated id's from (range for
s3is -12 to 35, not the same range for all cameras due to different available steps by Canon) to change the "user Tv" propcase, I think. Those steps are definded by CHDK in platform/*/shooting.c shutterspeeds_table[].